diff options
author | ludde <ludde@openttd.org> | 2005-07-15 18:30:13 +0000 |
---|---|---|
committer | ludde <ludde@openttd.org> | 2005-07-15 18:30:13 +0000 |
commit | 3486e7e9d5d24e2e0595b7a8d517581b926b85cd (patch) | |
tree | 77cbbb71361c4ceb1306dc06c65b6364221d6c2f /industry_cmd.c | |
parent | 157addf5e9d85e513355edb97d513443ba9c131f (diff) | |
download | openttd-3486e7e9d5d24e2e0595b7a8d517581b926b85cd.tar.xz |
(svn r2580) Change: Added {INDUSTRY} command for printing industry names instead of the old {TOWN} {STRING} way.
- The formatting of the industry name can be controlled with the string STR_INDUSTRY_FORMAT.
Change: Changed several occurences of {STRING1} into {TOWN} to get rid of townnametype being used directly.
Diffstat (limited to 'industry_cmd.c')
-rw-r--r-- | industry_cmd.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/industry_cmd.c b/industry_cmd.c index 6ed9446b0..e2860a477 100644 --- a/industry_cmd.c +++ b/industry_cmd.c @@ -1719,10 +1719,9 @@ static void ExtChangeIndustryProduction(Industry *i) mag = abs(percent); if (mag >= 10) { - SetDParam(3, mag); + SetDParam(2, mag); SetDParam(0, _cargoc.names_s[i->produced_cargo[j]]); - SetDParam(1, i->town->index); - SetDParam(2, i->type + STR_4802_COAL_MINE); + SetDParam(1, i->index); AddNewsItem(percent >= 0 ? STR_INDUSTRY_PROD_GOUP : STR_INDUSTRY_PROD_GODOWN, NEWS_FLAGS(NM_THIN, NF_VIEWPORT|NF_TILE, NT_ECONOMY, 0), i->xy + TileDiffXY(1, 1), 0); @@ -1733,8 +1732,7 @@ static void ExtChangeIndustryProduction(Industry *i) if (closeit) { i->prod_level = 0; - SetDParam(1, i->type + STR_4802_COAL_MINE); - SetDParam(0, i->town->index); + SetDParam(0, i->index); AddNewsItem(_industry_close_strings[i->type], NEWS_FLAGS(NM_THIN, NF_VIEWPORT|NF_TILE, NT_ECONOMY, 0), i->xy + TileDiffXY(1, 1), 0); @@ -1882,8 +1880,7 @@ static void ChangeIndustryProduction(Industry *i) } if (str != STR_NULL) { - SetDParam(1, type + STR_4802_COAL_MINE); - SetDParam(0, i->town->index); + SetDParam(0, i->index); AddNewsItem(str, NEWS_FLAGS(NM_THIN, NF_VIEWPORT|NF_TILE, NT_ECONOMY, 0), i->xy + TileDiffXY(1, 1), 0); } } |