Changeset - r11:c7045bf4c614
[Not reviewed]
master
0 8 0
dominik - 20 years ago 2004-08-10 17:06:10
dominik@openttd.org
(svn r12) Change: removed patch no_train_service. Instead you can set the default service interval for any vehicle type to 'disabled'.
8 files changed with 27 insertions and 15 deletions:
0 comments (0 inline, 0 general)
aircraft_cmd.c
Show inline comments
 
@@ -525,6 +525,9 @@ static void CheckIfAircraftNeedsService(
 
{
 
	Station *st;
 

	
 
	if (_patches.servint_aircraft == 0 && IS_HUMAN_PLAYER(v->owner))
 
		return;
 

	
 
	if (v->date_of_last_service + v->service_interval > _date)
 
		return;
 

	
lang/english.txt
Show inline comments
 
@@ -917,7 +917,6 @@ STR_CONFIG_PATCHES_REALISTICACCEL		:{LTB
 
STR_CONFIG_PATCHES_JOINSTATIONS			:{LTBLUE}Join train stations built next to each other: {ORANGE}{STRING}
 
STR_CONFIG_PATCHES_FULLLOADANY			:{LTBLUE}Leave station when any cargo is full, if 'full load': {ORANGE}{STRING}
 
STR_CONFIG_PATCHES_INFLATION				:{LTBLUE}Inflation: {ORANGE}{STRING}
 
STR_CONFIG_PATCHES_NOTRAINSERVICE		:{LTBLUE}No automatic train servicing: {ORANGE}{STRING}
 
STR_CONFIG_PATCHES_SELECTGOODS			:{LTBLUE}Deliver cargo to a station only when there is a demand: {ORANGE}{STRING}
 
STR_CONFIG_PATCHES_LONGBRIDGES			:{LTBLUE}Allow building very long bridges: {ORANGE}{STRING}
 
STR_CONFIG_PATCHES_GOTODEPOT			:{LTBLUE}Allow goto depot orders: {ORANGE}{STRING}
 
@@ -938,6 +937,7 @@ STR_CONFIG_PATCHES_BUILD_IN_PAUSE		:{LTB
 
STR_CONFIG_PATCHES_SMALL_AIRPORTS		:{LTBLUE}Always allow small airports: {ORANGE}{STRING}
 

	
 
STR_CONFIG_PATCHES_LOST_TRAIN_DAYS		:{LTBLUE}A train is lost if no progress is made for: {ORANGE}{STRING} days
 
STR_CONFIG_PATCHES_LOST_TRAIN_DAYS_DISABLED		:{LTBLUE}A train is lost if no progress is made for: {ORANGE}disabled
 
STR_CONFIG_PATCHES_WARN_INCOME_LESS		:{LTBLUE}Warn if a train's income is negative: {ORANGE}{STRING}
 
STR_CONFIG_PATCHES_NEVER_EXPIRE_VEHICLES	:{LTBLUE}Vehicles never expire: {ORANGE}{STRING}
 
STR_CONFIG_AUTORENEW_VEHICLE			:{LTBLUE}Autorenew vehicle when it gets old
 
@@ -956,10 +956,14 @@ STR_CONFIG_PATCHES_AI_BUILDS_ROADVEH	:{L
 
STR_CONFIG_PATCHES_AI_BUILDS_AIRCRAFT	:{LTBLUE}Disable aircraft for computer: {ORANGE}{STRING}
 
STR_CONFIG_PATCHES_AI_BUILDS_SHIPS		:{LTBLUE}Disable ships for computer: {ORANGE}{STRING}
 

	
 
STR_CONFIG_PATCHES_SERVINT_TRAINS		:{LTBLUE}Default service interval for trains: {ORANGE}{STRING} days
 
STR_CONFIG_PATCHES_SERVINT_ROADVEH		:{LTBLUE}Default service interval for road vehicles: {ORANGE}{STRING} days
 
STR_CONFIG_PATCHES_SERVINT_AIRCRAFT		:{LTBLUE}Default service interval for aircraft: {ORANGE}{STRING} days
 
STR_CONFIG_PATCHES_SERVINT_SHIPS		:{LTBLUE}Default service interval for ships: {ORANGE}{STRING} days
 
STR_CONFIG_PATCHES_SERVINT_TRAINS							:{LTBLUE}Default service interval for trains: {ORANGE}{STRING} days
 
STR_CONFIG_PATCHES_SERVINT_TRAINS_DISABLED		:{LTBLUE}Default service interval for trains: {ORANGE}disabled
 
STR_CONFIG_PATCHES_SERVINT_ROADVEH						:{LTBLUE}Default service interval for road vehicles: {ORANGE}{STRING} days
 
STR_CONFIG_PATCHES_SERVINT_ROADVEH_DISABLED		:{LTBLUE}Default service interval for road vehicles: {ORANGE}disabled
 
STR_CONFIG_PATCHES_SERVINT_AIRCRAFT						:{LTBLUE}Default service interval for aircraft: {ORANGE}{STRING} days
 
STR_CONFIG_PATCHES_SERVINT_AIRCRAFT_DISABLED	:{LTBLUE}Default service interval for aircraft: {ORANGE}disabled
 
STR_CONFIG_PATCHES_SERVINT_SHIPS							:{LTBLUE}Default service interval for ships: {ORANGE}{STRING} days
 
STR_CONFIG_PATCHES_SERVINT_SHIPS_DISABLED			:{LTBLUE}Default service interval for ships: {ORANGE}disabled
 

	
 
STR_CONFIG_PATCHES_COLORED_NEWS_DATE	:{LTBLUE}Colored news appears in: {ORANGE}{STRING}
 
STR_CONFIG_PATCHES_STARTING_DATE		:{LTBLUE}Starting date: {ORANGE}{STRING}
roadveh_cmd.c
Show inline comments
 
@@ -1488,6 +1488,9 @@ static void CheckIfRoadVehNeedsService(V
 
{
 
	int i;
 

	
 
	if (_patches.servint_roadveh == 0 && IS_HUMAN_PLAYER(v->owner))
 
		return;
 

	
 
	if (v->date_of_last_service + v->service_interval > _date)
 
		return;
 

	
settings.c
Show inline comments
 
@@ -797,7 +797,6 @@ static const SettingDesc patch_settings[
 
	{"full_load_any", SDT_BOOL, (void*)true, (void*)offsetof(Patches, full_load_any)},
 

	
 
	{"inflation", SDT_BOOL, (void*)true, (void*)offsetof(Patches, inflation)},
 
	{"no_train_service", SDT_BOOL, (void*)false, (void*)offsetof(Patches, no_train_service)},
 
	{"selectgoods", SDT_BOOL, (void*)true, (void*)offsetof(Patches, selectgoods)},
 
	{"longbridges", SDT_BOOL, (void*)false, (void*)offsetof(Patches, longbridges)},
 
	{"gotodepot", SDT_BOOL, (void*)true, (void*)offsetof(Patches, gotodepot)},
settings_gui.c
Show inline comments
 
@@ -698,7 +698,6 @@ static const PatchEntry _patches_constru
 
static const PatchEntry _patches_vehicles[] = {
 
	{PE_BOOL, 0, STR_CONFIG_PATCHES_REALISTICACCEL, &_patches.realistic_acceleration},
 
	{PE_BOOL, 0, STR_CONFIG_PATCHES_MAMMOTHTRAINS, &_patches.mammoth_trains},
 
	{PE_BOOL, 0, STR_CONFIG_PATCHES_NOTRAINSERVICE, &_patches.no_train_service},
 
	{PE_BOOL, 0, STR_CONFIG_PATCHES_GOTODEPOT, &_patches.gotodepot},
 
	{PE_BOOL, 0, STR_CONFIG_PATCHES_ROADVEH_QUEUE, &_patches.roadveh_queue},
 
	{PE_BOOL, 0, STR_CONFIG_PATCHES_NEW_DEPOT_FINDING, &_patches.new_depot_finding},
 
@@ -715,10 +714,10 @@ static const PatchEntry _patches_vehicle
 
	{PE_UINT8, 0, STR_CONFIG_PATCHES_MAX_AIRCRAFT, &_patches.max_aircraft, 0, 240, 10},
 
	{PE_UINT8, 0, STR_CONFIG_PATCHES_MAX_SHIPS, &_patches.max_ships, 0, 240, 10},
 

	
 
	{PE_UINT16, 0, STR_CONFIG_PATCHES_SERVINT_TRAINS, &_patches.servint_trains, 0, 1200, 10},
 
	{PE_UINT16, 0, STR_CONFIG_PATCHES_SERVINT_ROADVEH, &_patches.servint_roadveh, 0, 1200, 10},
 
	{PE_UINT16, 0, STR_CONFIG_PATCHES_SERVINT_AIRCRAFT, &_patches.servint_aircraft, 0, 1200, 10},
 
	{PE_UINT16, 0, STR_CONFIG_PATCHES_SERVINT_SHIPS, &_patches.servint_ships, 0, 1200, 10},
 
	{PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_TRAINS, &_patches.servint_trains, 30, 1200, 10},
 
	{PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_ROADVEH, &_patches.servint_roadveh, 30, 1200, 10},
 
	{PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_AIRCRAFT, &_patches.servint_aircraft, 30, 1200, 10},
 
	{PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_SHIPS, &_patches.servint_ships, 30, 1200, 10},
 

	
 
	{PE_BYTE, 0, STR_CONFIG_PATCHES_AI_BUILDS_TRAINS, &_patches.ai_disable_veh, 0x01},
 
	{PE_BYTE, 0, STR_CONFIG_PATCHES_AI_BUILDS_ROADVEH, &_patches.ai_disable_veh, 0x02},
 
@@ -814,6 +813,7 @@ static void PatchesSelectionWndProc(Wind
 
		clk = WP(w,def_d).data_2;
 
		page = &_patches_page[WP(w,def_d).data_1];
 
		for(i=0,pe=page->entries; i!=page->num; i++,pe++) {
 
			bool disabled = false;
 
			if (pe->type == PE_BOOL) {
 
				DrawFrameRect(x+5, y+1, x+15+9, y+9, (*(bool*)pe->variable)?6:4, (*(bool*)pe->variable)?0x20:0);
 
				SET_DPARAM16(0, *(bool*)pe->variable ? STR_CONFIG_PATCHES_ON : STR_CONFIG_PATCHES_OFF);
 
@@ -830,14 +830,15 @@ static void PatchesSelectionWndProc(Wind
 
				DrawStringCentered(x+20, y+1, STR_681A, 0);
 

	
 
				val = ReadPE(pe);
 
				if (val == 0 && pe->flags & PF_0ISDIS) {
 
				disabled = ((val == 0) && (pe->flags & PF_0ISDIS));
 
				if (disabled) {
 
					SET_DPARAM16(0, STR_CONFIG_PATCHES_DISABLED);
 
				} else {
 
					SET_DPARAM32(1, val);
 
					SET_DPARAM16(0, pe->flags & PF_NOCOMMA ? STR_CONFIG_PATCHES_INT32 : STR_7024);
 
				}
 
			}
 
			DrawString(30, y+1, pe->str, 0);
 
			DrawString(30, y+1, (pe->str)+disabled, 0);
 
			y += 11;
 
		}
 
		break;
ship_cmd.c
Show inline comments
 
@@ -85,6 +85,9 @@ static void CheckIfShipNeedsService(Vehi
 
{
 
	int i;
 

	
 
	if (_patches.servint_ships == 0 && IS_HUMAN_PLAYER(v->owner))
 
		return;
 

	
 
	if (v->date_of_last_service + v->service_interval > _date)
 
		return;
 

	
train_cmd.c
Show inline comments
 
@@ -2503,7 +2503,7 @@ static void CheckIfTrainNeedsService(Veh
 
	uint tile;
 
	byte depot;
 

	
 
	if (_patches.no_train_service && IS_HUMAN_PLAYER(v->owner))
 
	if (_patches.servint_trains == 0 && IS_HUMAN_PLAYER(v->owner))
 
		return;
 

	
 
	if (v->date_of_last_service + v->service_interval > _date)
variables.h
Show inline comments
 
@@ -87,7 +87,6 @@ typedef struct Patches {
 
	bool full_load_any;			// new full load calculation, any cargo must be full
 
	byte station_spread;		// amount a station may spread
 
	bool inflation;					// disable inflation
 
	bool no_train_service;	// never automatically send trains to service
 
	bool selectgoods;       // only send the goods to station if a train has been there
 
	bool longbridges;				// allow 100 tile long bridges
 
	bool gotodepot;					// allow goto depot in orders
0 comments (0 inline, 0 general)