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

Method SetText

src/script/api/script_goal.cpp:88–99  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

86}
87
88/* static */ bool ScriptGoal::SetText(GoalID goal_id, Text *goal)
89{
90 ScriptObjectRef counter(goal);
91
92 EnforcePrecondition(false, IsValidGoal(goal_id));
93 EnforceDeityMode(false);
94 EnforcePrecondition(false, goal != nullptr);
95 EncodedString text = goal->GetEncodedText();
96 EnforcePreconditionEncodedText(false, text);
97
98 return ScriptObject::Command<CMD_SET_GOAL_TEXT>::Do(goal_id, text);
99}
100
101/* static */ bool ScriptGoal::SetProgress(GoalID goal_id, Text *progress)
102{

Callers

nothing calls this directly

Calls 1

GetEncodedTextMethod · 0.80

Tested by

no test coverage detected