From 68dda86c5bbe2d663edb19699f58208f1d5a6f6e Mon Sep 17 00:00:00 2001 From: peter1138 Date: Fri, 20 Oct 2006 11:53:29 +0000 Subject: (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. --- industry_gui.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'industry_gui.c') 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); -- cgit v1.2.3-54-g00ecf