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

Method SetProgress

src/script/api/script_goal.cpp:101–109  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

99}
100
101/* static */ bool ScriptGoal::SetProgress(GoalID goal_id, Text *progress)
102{
103 ScriptObjectRef counter(progress);
104
105 EnforcePrecondition(false, IsValidGoal(goal_id));
106 EnforceDeityMode(false);
107
108 return ScriptObject::Command<CMD_SET_GOAL_PROGRESS>::Do(goal_id, progress != nullptr ? progress->GetEncodedText() : EncodedString{});
109}
110
111/* static */ bool ScriptGoal::SetCompleted(GoalID goal_id, bool completed)
112{

Callers

nothing calls this directly

Calls 1

GetEncodedTextMethod · 0.80

Tested by

no test coverage detected