summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-02-20 22:09:21 +0000
committerpeter1138 <peter1138@openttd.org>2007-02-20 22:09:21 +0000
commit3d581f4f894293f45666220de78651ba6b9a7d1c (patch)
tree9caff20858ac3f06265e4f69d54b9cdb03a47004 /src/industry_gui.cpp
parentf91ed92648c6577f7605e1eba63c82532735bbad (diff)
downloadopenttd-3d581f4f894293f45666220de78651ba6b9a7d1c.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.cpp7
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;
}
}