summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--industry_gui.c10
-rw-r--r--lang/english.txt1
-rw-r--r--misc_gui.c7
-rw-r--r--variables.h1
4 files changed, 9 insertions, 10 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;
diff --git a/lang/english.txt b/lang/english.txt
index 525195e96..e40c947cc 100644
--- a/lang/english.txt
+++ b/lang/english.txt
@@ -1090,6 +1090,7 @@ STR_CHEAT_BUILD_IN_PAUSE :{LTBLUE}Build while in pause mode: {ORANGE}{STRING
STR_CHEAT_NO_JETCRASH :{LTBLUE}Jetplanes will not crash (frequently) on small airports: {ORANGE} {STRING}
STR_CHEAT_SWITCH_CLIMATE :{LTBLUE}Switch climate: {ORANGE} {STRING}
STR_CHEAT_CHANGE_DATE :{LTBLUE}Change date: {ORANGE} {DATE_SHORT}
+STR_CHEAT_SETUP_PROD :{LTBLUE}Enable modifying production values: {ORANGE}{STRING}
STR_HEADING_FOR_WAYPOINT :{LTBLUE}Heading for {WAYPOINT}
STR_HEADING_FOR_WAYPOINT_VEL :{LTBLUE}Heading for {WAYPOINT}, {VELOCITY}
diff --git a/misc_gui.c b/misc_gui.c
index 43e3908c7..f60c85f13 100644
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -1614,6 +1614,7 @@ static const CheatEntry _cheats_ui[] = {
{CE_BOOL, 0, STR_CHEAT_CROSSINGTUNNELS, &_cheats.crossing_tunnels.value,&_cheats.crossing_tunnels.been_used,NULL, 0, 0, 0},
{CE_BOOL, 0, STR_CHEAT_BUILD_IN_PAUSE, &_cheats.build_in_pause.value, &_cheats.build_in_pause.been_used, NULL, 0, 0, 0},
{CE_BOOL, 0, STR_CHEAT_NO_JETCRASH, &_cheats.no_jetcrash.value, &_cheats.no_jetcrash.been_used, NULL, 0, 0, 0},
+ {CE_BOOL, 0, STR_CHEAT_SETUP_PROD, &_cheats.setup_prod.value, &_cheats.setup_prod.been_used, NULL, 0, 0, 0},
{CE_UINT8, 0, STR_CHEAT_SWITCH_CLIMATE, &_opt.landscape, &_cheats.switch_climate.been_used, &ClickChangeClimateCheat,-1, 4, 1},
{CE_UINT8, 0, STR_CHEAT_CHANGE_DATE, &_cur_year, &_cheats.change_date.been_used, &ClickChangeDateCheat, -1, 1, 1},
};
@@ -1622,8 +1623,8 @@ static const CheatEntry _cheats_ui[] = {
static const Widget _cheat_widgets[] = {
{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
{ WWT_CAPTION, RESIZE_NONE, 14, 11, 399, 0, 13, STR_CHEATS, STR_018C_WINDOW_TITLE_DRAG_THIS},
-{ WWT_PANEL, RESIZE_NONE, 14, 0, 399, 14, 147, 0x0, STR_NULL},
-{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 399, 14, 147, 0x0, STR_CHEATS_TIP},
+{ WWT_PANEL, RESIZE_NONE, 14, 0, 399, 14, 159, 0x0, STR_NULL},
+{ WWT_IMGBTN, RESIZE_NONE, 14, 0, 399, 14, 159, 0x0, STR_CHEATS_TIP},
{ WIDGETS_END},
};
@@ -1758,7 +1759,7 @@ static void CheatsWndProc(Window *w, WindowEvent *e)
}
}
static const WindowDesc _cheats_desc = {
- 240, 22, 400, 148,
+ 240, 22, 400, 160,
WC_CHEATS,0,
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
_cheat_widgets,
diff --git a/variables.h b/variables.h
index 5442f186a..46636cf19 100644
--- a/variables.h
+++ b/variables.h
@@ -208,6 +208,7 @@ typedef struct Cheats {
Cheat no_jetcrash; // no jet will crash on small airports anymore
Cheat switch_climate;
Cheat change_date; //changes date ingame
+ Cheat setup_prod; //setup raw-material production in game
} Cheats;
VARDEF Cheats _cheats;