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
commit5d7851e8d63766b15881bafd4940bf89f37b2bdc (patch)
tree5c7ccb204d4278fc86a352be079b38923bb69dab /src/players.cpp
parenta3d037956f4f1dcde98c30cd8b30f3c9cc626a1b (diff)
downloadopenttd-5d7851e8d63766b15881bafd4940bf89f37b2bdc.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);