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

Method GetTextfile

src/script/script_config.cpp:178–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178std::optional<std::string> ScriptConfig::GetTextfile(TextfileType type, CompanyID slot) const
179{
180 if (slot == CompanyID::Invalid() || this->GetInfo() == nullptr) return std::nullopt;
181
182 return ::GetTextfile(type, (slot == OWNER_DEITY) ? GAME_DIR : AI_DIR, this->GetInfo()->GetMainScript());
183}
184
185void ScriptConfig::SetToLoadData(ScriptInstance::ScriptData *data)
186{

Callers 3

OnInvalidateDataMethod · 0.45
OnInvalidateDataMethod · 0.45
OnInvalidateDataMethod · 0.45

Calls 4

GetInfoMethod · 0.95
InvalidFunction · 0.85
GetTextfileFunction · 0.85
GetMainScriptMethod · 0.80

Tested by

no test coverage detected