summaryrefslogtreecommitdiff
path: root/src/players.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-13 10:17:04 +0000
committerrubidium <rubidium@openttd.org>2008-05-13 10:17:04 +0000
commitd0c79e1164b912644bc0260910bffd88cf2d0cf5 (patch)
tree5c7ccb204d4278fc86a352be079b38923bb69dab /src/players.cpp
parentd0033bfb077a961d8d7bf6bc9f29b1251643201c (diff)
downloadopenttd-d0c79e1164b912644bc0260910bffd88cf2d0cf5.tar.xz
(svn r13065) -Codechange: remove the need for the news string callbacks. Patch by Cirdan.
Diffstat (limited to 'src/players.cpp')
-rw-r--r--src/players.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/players.cpp b/src/players.cpp
index 4a297936c..1026088ca 100644
--- a/src/players.cpp
+++ b/src/players.cpp
@@ -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);