(svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted.

This commit is contained in:
frosch
2009-05-24 16:52:42 +00:00
parent b7d065ce99
commit a4557c7da4
20 changed files with 216 additions and 162 deletions

View File

@@ -289,7 +289,7 @@ set_name:;
SetDParam(1, STR_NEWS_COMPANY_LAUNCH_DESCRIPTION);
SetDParamStr(2, cni->company_name);
SetDParam(3, t->index);
AddNewsItem(STR_NEWS_MESSAGE, NS_COMPANY_NEW, c->last_build_coordinate, 0, cni);
AddNewsItem(STR_NEWS_MESSAGE, NS_COMPANY_NEW, NR_TILE, c->last_build_coordinate, NR_NONE, UINT32_MAX, cni);
}
AI::BroadcastNewEvent(new AIEventCompanyNew(c->index), c->index);
return;
@@ -827,7 +827,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
SetDParam(0, STR_NEWS_COMPANY_BANKRUPT_TITLE);
SetDParam(1, STR_NEWS_COMPANY_BANKRUPT_DESCRIPTION);
SetDParamStr(2, cni->company_name);
AddNewsItem(STR_NEWS_MESSAGE, NS_COMPANY_BANKRUPT, 0, 0, cni);
AddCompanyNewsItem(STR_NEWS_MESSAGE, NS_COMPANY_BANKRUPT, cni);
/* Remove the company */
ChangeOwnershipOfCompanyItems(c->index, INVALID_OWNER);