Changeset - r1176:207d85469a1e
[Not reviewed]
master
0 4 0
miham - 19 years ago 2005-01-26 10:52:23
miham@openttd.org
(svn r1678) Added cheat option for setting production of raw-material product industries in game
4 files changed with 9 insertions and 10 deletions:
0 comments (0 inline, 0 general)
industry_gui.c
Show inline comments
 
@@ -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 *
 

	
 
			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;
lang/english.txt
Show inline comments
 
@@ -1090,6 +1090,7 @@ STR_CHEAT_BUILD_IN_PAUSE					:{LTBLUE}Bu
 
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}
misc_gui.c
Show inline comments
 
@@ -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, Win
 
	}
 
}
 
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,
variables.h
Show inline comments
 
@@ -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;
0 comments (0 inline, 0 general)