From 11d702225b5999919d742997e866a777ca29a3c3 Mon Sep 17 00:00:00 2001 From: Steve Cotton Date: Thu, 23 Jul 2020 19:18:08 +0200 Subject: [PATCH] Warn about manually editing files created by the scenario editor (#5001) 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. --- src/editor/map/map_context.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/editor/map/map_context.cpp b/src/editor/map/map_context.cpp index cbf27e12ff39..022d9787e477 100644 --- a/src/editor/map/map_context.cpp +++ b/src/editor/map/map_context.cpp @@ -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());