diff options
author | peter1138 <peter1138@openttd.org> | 2006-10-20 11:53:29 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-10-20 11:53:29 +0000 |
commit | 8411b3b9fe2a27789fb5c36b2165c2c6c8c5708a (patch) | |
tree | 6b676140b8977dd0e425e562f8bb9f2d5caa3e6f /industry_gui.c | |
parent | 5b72dd22e8f64bf43484fad783e06eff6c71c01a (diff) | |
download | openttd-8411b3b9fe2a27789fb5c36b2165c2c6c8c5708a.tar.xz |
(svn r6855) - Codechange: When displaying a "quantity of cargo" string, use the {CARGO} command and supply the cargo type and quantity, instead of manually looking up the cargo type's string.
Diffstat (limited to 'industry_gui.c')
-rw-r--r-- | industry_gui.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/industry_gui.c b/industry_gui.c index d0be15e9a..a5c9258bc 100644 --- a/industry_gui.c +++ b/industry_gui.c @@ -315,7 +315,7 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e) if (i->produced_cargo[0] != CT_INVALID) { DrawString(2, 117, STR_482A_PRODUCTION_LAST_MONTH, 0); - SetDParam(0, _cargoc.names_long[i->produced_cargo[0]]); + SetDParam(0, i->produced_cargo[0]); SetDParam(1, i->total_production[0]); SetDParam(2, i->pct_transported[0] * 100 >> 8); @@ -327,7 +327,7 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e) } if (i->produced_cargo[1] != CT_INVALID) { - SetDParam(0, _cargoc.names_long[i->produced_cargo[1]]); + SetDParam(0, i->produced_cargo[1]); SetDParam(1, i->total_production[1]); SetDParam(2, i->pct_transported[1] * 100 >> 8); DrawString(4 + (IsProductionAlterable(i) ? 30 : 0), 137, STR_482B_TRANSPORTED, 0); @@ -600,11 +600,11 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e) SetDParam(0, i->index); if (i->produced_cargo[0] != CT_INVALID) { - SetDParam(1, _cargoc.names_long[i->produced_cargo[0]]); + SetDParam(1, i->produced_cargo[0]); SetDParam(2, i->total_production[0]); if (i->produced_cargo[1] != CT_INVALID) { - SetDParam(3, _cargoc.names_long[i->produced_cargo[1]]); + SetDParam(3, i->produced_cargo[1]); SetDParam(4, i->total_production[1]); SetDParam(5, i->pct_transported[0] * 100 >> 8); SetDParam(6, i->pct_transported[1] * 100 >> 8); |