Skip to content

Commit

Permalink
Warn about manually editing files created by the scenario editor (#5001)
Browse files Browse the repository at this point in the history
This comment will be added at the start of any .cfg file written by the
scenario editor. Given that the only target audience is authors using text
editors, it's not translatable and uses plain ascii characters.
  • Loading branch information
stevecotton committed Jul 23, 2020
1 parent 67b4fb9 commit 11d7022
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/editor/map/map_context.cpp
Expand Up @@ -589,6 +589,14 @@ bool map_context::save_scenario()

try {
std::stringstream wml_stream;
wml_stream
<< "# This file was generated using the scenario editor.\n"
<< "#\n"
<< "# If you edit this file by hand, then you shouldn't use the\n"
<< "# scenario editor on it afterwards. The editor completely\n"
<< "# rewrites the file when it saves it, which will lose any WML\n"
<< "# that the editor doesn't support.\n"
<< "\n";
{
config_writer out(wml_stream, false);
out.write(to_config());
Expand Down

0 comments on commit 11d7022

Please sign in to comment.