MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsValid

Method IsValid

src/script/api/script_gamesettings.cpp:19–23  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

17#include "../../safeguards.h"
18
19/* static */ bool ScriptGameSettings::IsValid(const std::string &setting)
20{
21 const SettingDesc *sd = GetSettingFromName(setting);
22 return sd != nullptr && sd->IsIntSetting();
23}
24
25/* static */ SQInteger ScriptGameSettings::GetValue(const std::string &setting)
26{

Callers

nothing calls this directly

Calls 2

GetSettingFromNameFunction · 0.85
IsIntSettingMethod · 0.45

Tested by

no test coverage detected