mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-27 14:14:27 +01:00
Codechange: do not use ScriptCompany::CompanyID outside of the script API
This commit is contained in:
@@ -3390,8 +3390,8 @@ static CommandCost TownActionRoadRebuild(Town *t, DoCommandFlag flags)
|
||||
AddNewsItem(
|
||||
TimerGameEconomy::UsingWallclockUnits() ? STR_NEWS_ROAD_REBUILDING_MINUTES : STR_NEWS_ROAD_REBUILDING_MONTHS,
|
||||
NewsType::General, NewsStyle::Normal, {}, NewsReferenceType::Town, t->index, NewsReferenceType::None, UINT32_MAX);
|
||||
AI::BroadcastNewEvent(new ScriptEventRoadReconstruction((ScriptCompany::CompanyID)(Owner)_current_company, t->index));
|
||||
Game::NewEvent(new ScriptEventRoadReconstruction((ScriptCompany::CompanyID)(Owner)_current_company, t->index));
|
||||
AI::BroadcastNewEvent(new ScriptEventRoadReconstruction(_current_company, t->index));
|
||||
Game::NewEvent(new ScriptEventRoadReconstruction(_current_company, t->index));
|
||||
}
|
||||
return CommandCost();
|
||||
}
|
||||
@@ -3545,8 +3545,8 @@ static CommandCost TownActionBuyRights(Town *t, DoCommandFlag flags)
|
||||
SetDParam(2, t->index);
|
||||
SetDParamStr(3, cni->company_name);
|
||||
AddNewsItem(STR_MESSAGE_NEWS_FORMAT, NewsType::General, NewsStyle::Company, {}, NewsReferenceType::Town, t->index, NewsReferenceType::None, UINT32_MAX, std::move(cni));
|
||||
AI::BroadcastNewEvent(new ScriptEventExclusiveTransportRights((ScriptCompany::CompanyID)(Owner)_current_company, t->index));
|
||||
Game::NewEvent(new ScriptEventExclusiveTransportRights((ScriptCompany::CompanyID)(Owner)_current_company, t->index));
|
||||
AI::BroadcastNewEvent(new ScriptEventExclusiveTransportRights(_current_company, t->index));
|
||||
Game::NewEvent(new ScriptEventExclusiveTransportRights(_current_company, t->index));
|
||||
}
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user