summaryrefslogtreecommitdiff
path: root/industry_gui.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-10-20 11:53:29 +0000
committerpeter1138 <peter1138@openttd.org>2006-10-20 11:53:29 +0000
commit68dda86c5bbe2d663edb19699f58208f1d5a6f6e (patch)
tree6b676140b8977dd0e425e562f8bb9f2d5caa3e6f /industry_gui.c
parent4b674976d55e6cc2236429b286ce6f40f771b3ea (diff)
downloadopenttd-68dda86c5bbe2d663edb19699f58208f1d5a6f6e.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.c8
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);