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

Method RegisterAPI

src/game/game_instance.cpp:46–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void GameInstance::RegisterAPI()
47{
48 ScriptInstance::RegisterAPI();
49
50 /* Register all classes */
51 SQGS_RegisterAll(*this->engine);
52
53 if (!this->LoadCompatibilityScripts(GAME_DIR, GameInfo::ApiVersions)) this->Died();
54
55 if (this->IsAlive()) RegisterGameTranslation(*this->engine);
56}
57
58int GameInstance::GetSetting(const std::string &name)
59{

Callers

nothing calls this directly

Calls 4

DiedMethod · 0.95
RegisterGameTranslationFunction · 0.85
IsAliveMethod · 0.80

Tested by

no test coverage detected