From 5565ae1ac0d41c95812fe1a1713188a200d75876 Mon Sep 17 00:00:00 2001 From: planetmaker Date: Sun, 7 Nov 2010 21:46:41 +0000 Subject: (svn r21116) -Add [FS#3012]: Reduce the chances to accidentially break savegames with NewGRFs --- src/settings_type.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/settings_type.h') 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. */ -- cgit v1.2.3-54-g00ecf