diff options
author | peter1138 <peter1138@openttd.org> | 2007-02-20 22:09:21 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-02-20 22:09:21 +0000 |
commit | ef2daa5060e251834e82df1ba3e081579ff84f2f (patch) | |
tree | 9caff20858ac3f06265e4f69d54b9cdb03a47004 /src/industry_gui.cpp | |
parent | 6621beb126c4bf1481b9d7826f3efd10c2bb8308 (diff) | |
download | openttd-ef2daa5060e251834e82df1ba3e081579ff84f2f.tar.xz |
(svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels.
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r-- | src/industry_gui.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index aa308b721..9cbe0c3f2 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -17,6 +17,7 @@ #include "town.h" #include "variables.h" #include "helpers.hpp" +#include "cargotype.h" const byte _build_industry_types[4][12] = { { 1, 2, 4, 6, 8, 0, 3, 5, 9, 11, 18 }, @@ -303,13 +304,13 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e) if (i->accepts_cargo[0] != CT_INVALID) { StringID str; - SetDParam(0, _cargoc.names_s[i->accepts_cargo[0]]); + SetDParam(0, GetCargo(i->accepts_cargo[0])->name); str = STR_4827_REQUIRES; if (i->accepts_cargo[1] != CT_INVALID) { - SetDParam(1, _cargoc.names_s[i->accepts_cargo[1]]); + SetDParam(1, GetCargo(i->accepts_cargo[1])->name); str = STR_4828_REQUIRES; if (i->accepts_cargo[2] != CT_INVALID) { - SetDParam(2, _cargoc.names_s[i->accepts_cargo[2]]); + SetDParam(2, GetCargo(i->accepts_cargo[2])->name); str = STR_4829_REQUIRES; } } |