summaryrefslogtreecommitdiff
path: root/src/settings_type.h
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2010-11-07 21:46:41 +0000
committerplanetmaker <planetmaker@openttd.org>2010-11-07 21:46:41 +0000
commit5565ae1ac0d41c95812fe1a1713188a200d75876 (patch)
tree8940467fc369492be882448b48326c7764bb1bbe /src/settings_type.h
parentb9ccf6dcccd6336dd24e6ed5d4cd02d93526c7c8 (diff)
downloadopenttd-5565ae1ac0d41c95812fe1a1713188a200d75876.tar.xz
(svn r21116) -Add [FS#3012]: Reduce the chances to accidentially break savegames with NewGRFs
Diffstat (limited to 'src/settings_type.h')
-rw-r--r--src/settings_type.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/settings_type.h b/src/settings_type.h
index 8e1b1bc9e..a433fd3fa 100644
--- a/src/settings_type.h
+++ b/src/settings_type.h
@@ -109,9 +109,19 @@ struct GUISettings {
uint8 developer; ///< print non-fatal warnings in console (>= 1), copy debug output to console (== 2)
bool show_date_in_logs; ///< whether to show dates in console logs
- bool newgrf_developer_tools; ///< activate NewGRF developer tools
+ bool newgrf_developer_tools; ///< activate NewGRF developer tools and allow modifying NewGRFs in an existing game
bool ai_developer_tools; ///< activate AI developer tools
+ bool scenario_developer; ///< activate scenario developer: allow modifying NewGRFs in an existing game
bool newgrf_show_old_versions; ///< whether to show old versions in the NewGRF list
+
+ /**
+ * Returns true when the user has sufficient privileges to edit newgrfs on a running game
+ * @return whether the user has sufficient privileges to edit newgrfs in an existing game
+ */
+ bool UserIsAllowedToChangeNewGRFs() const
+ {
+ return this->scenario_developer || this->newgrf_developer_tools;
+ }
};
/** Settings related to currency/unit systems. */