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

Method SetText

src/script/api/script_town.cpp:58–66  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

56}
57
58/* static */ bool ScriptTown::SetText(TownID town_id, Text *text)
59{
60 ScriptObjectRef counter(text);
61
62 EnforceDeityMode(false);
63 EnforcePrecondition(false, IsValidTown(town_id));
64
65 return ScriptObject::Command<CMD_TOWN_SET_TEXT>::Do(town_id, text != nullptr ? text->GetEncodedText() : EncodedString{});
66}
67
68/* static */ SQInteger ScriptTown::GetPopulation(TownID town_id)
69{

Callers

nothing calls this directly

Calls 1

GetEncodedTextMethod · 0.80

Tested by

no test coverage detected