diff options
author | frosch <frosch@openttd.org> | 2012-05-26 14:16:03 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-05-26 14:16:03 +0000 |
commit | a8c88f43b678b6d44e1fb4f78a51cdb7fb08a8aa (patch) | |
tree | 38b53a0432d536abc9dcfbbdd0b5c7c74bd55f99 /src/industry_cmd.cpp | |
parent | a0be398da9f80ac316b2d8959ddf96345414dde2 (diff) | |
download | openttd-a8c88f43b678b6d44e1fb4f78a51cdb7fb08a8aa.tar.xz |
(svn r24284) -Codechange: Remove NewsSubtypes and directly use NewsTypes and NewsFlag instead.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 5349f7d93..fd8387e2d 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1595,7 +1595,7 @@ static void AdvertiseIndustryOpening(const Industry *ind) } else { SetDParam(1, ind->town->index); } - AddIndustryNewsItem(ind_spc->new_industry_text, NS_INDUSTRY_OPEN, ind->index); + AddIndustryNewsItem(ind_spc->new_industry_text, NT_INDUSTRY_OPEN, ind->index); AI::BroadcastNewEvent(new ScriptEventIndustryOpen(ind->index)); Game::NewEvent(new ScriptEventIndustryOpen(ind->index)); } @@ -2415,12 +2415,12 @@ static int WhoCanServiceIndustry(Industry *ind) */ static void ReportNewsProductionChangeIndustry(Industry *ind, CargoID type, int percent) { - NewsSubtype ns; + NewsType nt; switch (WhoCanServiceIndustry(ind)) { - case 0: ns = NS_INDUSTRY_NOBODY; break; - case 1: ns = NS_INDUSTRY_OTHER; break; - case 2: ns = NS_INDUSTRY_COMPANY; break; + case 0: nt = NT_INDUSTRY_NOBODY; break; + case 1: nt = NT_INDUSTRY_OTHER; break; + case 2: nt = NT_INDUSTRY_COMPANY; break; default: NOT_REACHED(); } SetDParam(2, abs(percent)); @@ -2428,7 +2428,7 @@ static void ReportNewsProductionChangeIndustry(Industry *ind, CargoID type, int SetDParam(1, ind->index); AddIndustryNewsItem( percent >= 0 ? STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_SMOOTH : STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_SMOOTH, - ns, + nt, ind->index ); } @@ -2600,17 +2600,17 @@ static void ChangeIndustryProduction(Industry *i, bool monthly) } if (!suppress_message && str != STR_NULL) { - NewsSubtype ns; + NewsType nt; /* Compute news category */ if (closeit) { - ns = NS_INDUSTRY_CLOSE; + nt = NT_INDUSTRY_CLOSE; AI::BroadcastNewEvent(new ScriptEventIndustryClose(i->index)); Game::NewEvent(new ScriptEventIndustryClose(i->index)); } else { switch (WhoCanServiceIndustry(i)) { - case 0: ns = NS_INDUSTRY_NOBODY; break; - case 1: ns = NS_INDUSTRY_OTHER; break; - case 2: ns = NS_INDUSTRY_COMPANY; break; + case 0: nt = NT_INDUSTRY_NOBODY; break; + case 1: nt = NT_INDUSTRY_OTHER; break; + case 2: nt = NT_INDUSTRY_COMPANY; break; default: NOT_REACHED(); } } @@ -2628,9 +2628,9 @@ static void ChangeIndustryProduction(Industry *i, bool monthly) } /* and report the news to the user */ if (closeit) { - AddTileNewsItem(str, ns, i->location.tile + TileDiffXY(1, 1)); + AddTileNewsItem(str, nt, i->location.tile + TileDiffXY(1, 1)); } else { - AddIndustryNewsItem(str, ns, i->index); + AddIndustryNewsItem(str, nt, i->index); } } } |