Warn about manually editing files created by the scenario editor
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.
(cherry picked from commit 11d702225b
)
This commit is contained in:
parent
ba87c46a5d
commit
953d49c90f
2 changed files with 9 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
### Miscellaneous and bug fixes
|
||||
* Made wmllint recognize [remove_time_area] in order to avoid spurious warnings about
|
||||
unit ids.
|
||||
* Files created by the scenario editor include a boilerplate warning about hand-editing them.
|
||||
|
||||
## Version 1.14.13
|
||||
### Campaigns
|
||||
|
|
|
@ -588,6 +588,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());
|
||||
|
|
Loading…
Add table
Reference in a new issue