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

Method OnInvalidateData

src/script/script_gui.cpp:615–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613 }
614
615 void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
616 {
617 auto textfile = GetConfig(this->slot)->GetTextfile(file_type, this->slot);
618 if (!textfile.has_value()) {
619 this->Close();
620 } else {
621 this->LoadTextfile(textfile.value(), (this->slot == OWNER_DEITY) ? GAME_DIR : AI_DIR);
622 }
623 }
624};
625
626/**

Callers 1

ScriptTextfileWindowMethod · 0.95

Calls 5

GetConfigFunction · 0.85
LoadTextfileMethod · 0.80
GetTextfileMethod · 0.45
CloseMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected