summaryrefslogtreecommitdiff
path: root/industry_gui.c
diff options
context:
space:
mode:
authormiham <miham@openttd.org>2005-01-26 10:52:23 +0000
committermiham <miham@openttd.org>2005-01-26 10:52:23 +0000
commit7874c86cb29355441f1116a631a201fab5284f2a (patch)
treef906405a1cf17598bbb4f075a5c042d43b402e79 /industry_gui.c
parent6d23dac1f683305d6b2a0e368f4c45ccb738e81d (diff)
downloadopenttd-7874c86cb29355441f1116a631a201fab5284f2a.tar.xz
(svn r1678) Added cheat option for setting production of raw-material product industries in game
Diffstat (limited to 'industry_gui.c')
-rw-r--r--industry_gui.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/industry_gui.c b/industry_gui.c
index a9af53543..c8774286a 100644
--- a/industry_gui.c
+++ b/industry_gui.c
@@ -269,7 +269,7 @@ void ShowBuildIndustryWindow(void)
AllocateWindowDescFront(_industry_window_desc[_patches.build_rawmaterial_ind][_opt.landscape],0);
}
-#define NEED_ALTERB (_game_mode == GM_EDITOR && i->accepts_cargo[0] == CT_INVALID)
+#define NEED_ALTERB ((_game_mode == GM_EDITOR || _cheats.setup_prod.value) && i->accepts_cargo[0] == CT_INVALID)
static void IndustryViewWndProc(Window *w, WindowEvent *e)
{
// WP(w,vp2_d).data_1 is for the editbox line
@@ -339,12 +339,8 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e)
i = GetIndustry(w->window_number);
- // We should only work in editor
- if (_game_mode != GM_EDITOR)
- return;
-
- // And if the industry is raw-material producer
- if (i->accepts_cargo[0] != CT_INVALID)
+ // We should work if needed..
+ if (!NEED_ALTERB)
return;
x = e->click.pt.x;