summaryrefslogtreecommitdiff
path: root/src/script/script_config.hpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-07-12 18:54:27 +0000
committerrubidium <rubidium@openttd.org>2013-07-12 18:54:27 +0000
commit81ce9ad1897819c94099e3c542bb7f480ba0f57b (patch)
treeff3ec18f5d96d1d28895734bc13a81647b3cd7d3 /src/script/script_config.hpp
parent11f756ac974b1da2afd68a2496ae3f07e4da393d (diff)
downloadopenttd-81ce9ad1897819c94099e3c542bb7f480ba0f57b.tar.xz
(svn r25592) -Fix [FS#5644]: Changing the script difficulty level in-game would also change the settings using the default even though they were not allowed to change in-game
Diffstat (limited to 'src/script/script_config.hpp')
-rw-r--r--src/script/script_config.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/script/script_config.hpp b/src/script/script_config.hpp
index 23822de88..0350f8ded 100644
--- a/src/script/script_config.hpp
+++ b/src/script/script_config.hpp
@@ -108,6 +108,16 @@ public:
};
/**
+ * As long as the default of a setting has not been changed, the value of
+ * the setting is not stored. This to allow changing the difficulty setting
+ * without having to reset the script's config. However, when a setting may
+ * not be changed in game, we must "anchor" this value to what the setting
+ * would be at the time of starting. Otherwise changing the difficulty
+ * setting would change the setting's value (which isn't allowed).
+ */
+ void AnchorUnchangeableSettings();
+
+ /**
* Get the value of a setting for this config. It might fallback to his
* 'info' to find the default value (if not set or if not-custom difficulty
* level).