Class that handles all game settings related functions. More...
#include <ai_gamesettings.hpp>
Static Public Member Functions | |
static const char * | GetClassName () |
Get the name of this class to identify it towards squirrel. | |
static bool | IsValid (const char *setting) |
Is the given game setting a valid setting for this instance of OpenTTD? | |
static int32 | GetValue (const char *setting) |
Gets the value of the game setting. | |
static bool | IsDisabledVehicleType (AIVehicle::VehicleType vehicle_type) |
Checks whether the given vehicle-type is disabled for AIs. |
Class that handles all game settings related functions.
Definition at line 37 of file ai_gamesettings.hpp.
static const char* AIGameSettings::GetClassName | ( | ) | [inline, static] |
Get the name of this class to identify it towards squirrel.
Definition at line 40 of file ai_gamesettings.hpp.
int32 AIGameSettings::GetValue | ( | const char * | setting | ) | [static] |
Gets the value of the game setting.
setting | The setting to get the value of. |
Definition at line 23 of file ai_gamesettings.cpp.
References _settings_game, SettingDescBase::cmd, SaveLoad::conv, SettingDesc::desc, GetSettingFromName(), GetVariableAddress(), IsValid(), ReadValue(), SettingDesc::save, and SDT_BOOLX.
bool AIGameSettings::IsDisabledVehicleType | ( | AIVehicle::VehicleType | vehicle_type | ) | [static] |
Checks whether the given vehicle-type is disabled for AIs.
vehicle_type | The vehicle-type to check. |
Definition at line 36 of file ai_gamesettings.cpp.
References _settings_game, GameSettings::ai, AISettings::ai_disable_veh_aircraft, AISettings::ai_disable_veh_roadveh, AISettings::ai_disable_veh_ship, AISettings::ai_disable_veh_train, AIVehicle::VT_AIR, AIVehicle::VT_RAIL, AIVehicle::VT_ROAD, and AIVehicle::VT_WATER.
Referenced by AIVehicle::BuildVehicle().
bool AIGameSettings::IsValid | ( | const char * | setting | ) | [static] |
Is the given game setting a valid setting for this instance of OpenTTD?
setting | The setting to check for existence. |
Definition at line 16 of file ai_gamesettings.cpp.
References SettingDescBase::cmd, SettingDesc::desc, and GetSettingFromName().
Referenced by GetValue().