diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 20:57:43 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 20:57:43 +0000 |
commit | e53b2f2ab0ef24298e3bb511367b344b88a4a4c0 (patch) | |
tree | 583623234ea6802c7043e108d63927f35467192f /src/script/api/script_gamesettings.hpp | |
parent | 9359c6fc47f6fabddc399d044ea74dc6ebfdfb05 (diff) | |
download | openttd-e53b2f2ab0ef24298e3bb511367b344b88a4a4c0.tar.xz |
(svn r23616) -Add: ScriptGameSettings::SetValue, to set gamesettings (GameScript only)
Diffstat (limited to 'src/script/api/script_gamesettings.hpp')
-rw-r--r-- | src/script/api/script_gamesettings.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/script/api/script_gamesettings.hpp b/src/script/api/script_gamesettings.hpp index 217748571..40630a4e7 100644 --- a/src/script/api/script_gamesettings.hpp +++ b/src/script/api/script_gamesettings.hpp @@ -62,6 +62,17 @@ public: static int32 GetValue(const char *setting); /** + * Sets the value of the game setting. + * @param setting The setting to set the value of. + * @param value The value to set the setting to. + * @pre IsValid(setting). + * @return True if the action succeeded. + * @note Results achieved in the past offer no gurantee for the future. + * @api -ai + */ + static bool SetValue(const char *setting, int value); + + /** * Checks whether the given vehicle-type is disabled for AIs. * @param vehicle_type The vehicle-type to check. * @return True if the vehicle-type is disabled. |