summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aircraft_cmd.c3
-rw-r--r--lang/english.txt14
-rw-r--r--roadveh_cmd.c3
-rw-r--r--settings.c1
-rw-r--r--settings_gui.c15
-rw-r--r--ship_cmd.c3
-rw-r--r--train_cmd.c2
-rw-r--r--variables.h1
8 files changed, 27 insertions, 15 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index c78bddca2..2e95c1235 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -525,6 +525,9 @@ static void CheckIfAircraftNeedsService(Vehicle *v)
{
Station *st;
+ if (_patches.servint_aircraft == 0 && IS_HUMAN_PLAYER(v->owner))
+ return;
+
if (v->date_of_last_service + v->service_interval > _date)
return;
diff --git a/lang/english.txt b/lang/english.txt
index 44b2f28cd..26c82ca86 100644
--- a/lang/english.txt
+++ b/lang/english.txt
@@ -917,7 +917,6 @@ STR_CONFIG_PATCHES_REALISTICACCEL :{LTBLUE}Enable realistic acceleration for tr
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 :{LTBLUE}Build while in pause mode: {ORANGE}{
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 :{LTBLUE}Disable road vehicles for computer
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}
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 3c822a1c1..81ffe78ad 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -1488,6 +1488,9 @@ static void CheckIfRoadVehNeedsService(Vehicle *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;
diff --git a/settings.c b/settings.c
index 4dd5f3538..5275fb15b 100644
--- a/settings.c
+++ b/settings.c
@@ -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)},
diff --git a/settings_gui.c b/settings_gui.c
index 9700ef30c..ebb5c38eb 100644
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -698,7 +698,6 @@ static const PatchEntry _patches_construction[] = {
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_vehicles[] = {
{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(Window *w, WindowEvent *e)
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(Window *w, WindowEvent *e)
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;
diff --git a/ship_cmd.c b/ship_cmd.c
index a4993998b..eaf50fde1 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -85,6 +85,9 @@ static void CheckIfShipNeedsService(Vehicle *v)
{
int i;
+ if (_patches.servint_ships == 0 && IS_HUMAN_PLAYER(v->owner))
+ return;
+
if (v->date_of_last_service + v->service_interval > _date)
return;
diff --git a/train_cmd.c b/train_cmd.c
index 615610885..b17248389 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -2503,7 +2503,7 @@ static void CheckIfTrainNeedsService(Vehicle *v)
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)
diff --git a/variables.h b/variables.h
index 5530608df..4ea87f939 100644
--- a/variables.h
+++ b/variables.h
@@ -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