1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-24 04:34:16 +01:00

Codechange: strongly type GoalID

This commit is contained in:
Rubidium
2025-01-28 22:55:11 +01:00
committed by rubidium42
parent 7cc194e745
commit 6aada55e96
4 changed files with 8 additions and 5 deletions

View File

@@ -55,7 +55,7 @@
if (!ScriptObject::Command<CMD_CREATE_GOAL>::Do(&ScriptInstance::DoCommandReturnGoalID, ScriptCompany::FromScriptCompanyID(company), (::GoalType)type, destination, text)) return GOAL_INVALID;
/* In case of test-mode, we return GoalID 0 */
return static_cast<GoalID>(0);
return GoalID::Begin();
}
/* static */ bool ScriptGoal::Remove(GoalID goal_id)