(svn r13065) -Codechange: remove the need for the news string callbacks. Patch by Cirdan.
This commit is contained in:
@@ -356,8 +356,11 @@ set_name:;
|
||||
MarkWholeScreenDirty();
|
||||
|
||||
if (!IsHumanPlayer(p->index)) {
|
||||
SetDParam(0, t->index);
|
||||
AddNewsItem((StringID)(p->index | NB_BNEWCOMPANY), NM_CALLBACK, NF_TILE, NT_COMPANY_INFO, DNC_BANKRUPCY, p->last_build_coordinate, 0);
|
||||
SetDParam(0, STR_705E_NEW_TRANSPORT_COMPANY_LAUNCHED);
|
||||
SetDParam(1, STR_705F_STARTS_CONSTRUCTION_NEAR);
|
||||
SetDParam(2, p->index);
|
||||
SetDParam(3, t->index);
|
||||
AddNewsItem(STR_02B6, NM_CALLBACK, NF_TILE, NT_COMPANY_INFO, DNC_BANKRUPCY, p->last_build_coordinate, p->index | NB_BNEWCOMPANY);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -933,8 +936,10 @@ CommandCost CmdPlayerCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
DeletePlayerWindows(p->index);
|
||||
|
||||
/* Show the bankrupt news */
|
||||
SetDParam(0, p->index);
|
||||
AddNewsItem((StringID)(p->index | NB_BBANKRUPT), NM_CALLBACK, NF_NONE, NT_COMPANY_INFO, DNC_BANKRUPCY, 0, 0);
|
||||
SetDParam(0, STR_705C_BANKRUPT);
|
||||
SetDParam(1, STR_705D_HAS_BEEN_CLOSED_DOWN_BY);
|
||||
SetDParam(2, p->index);
|
||||
AddNewsItem(STR_02B6, NM_CALLBACK, NF_NONE, NT_COMPANY_INFO, DNC_BANKRUPCY, 0, p->index | NB_BBANKRUPT);
|
||||
|
||||
/* Remove the company */
|
||||
ChangeOwnershipOfPlayerItems(p->index, PLAYER_SPECTATOR);
|
||||
|
Reference in New Issue
Block a user