Index: lang/english.txt =================================================================== --- lang/english.txt (revision 7559) +++ lang/english.txt (working copy) @@ -1038,6 +1038,7 @@ STR_CONFIG_PATCHES_BRIBE :{LTBLUE}Allow bribing of the local authority: {ORANGE}{STRING1} STR_CONFIG_PATCHES_NONUNIFORM_STATIONS :{LTBLUE}Nonuniform stations: {ORANGE}{STRING1} STR_CONFIG_PATCHES_NEW_PATHFINDING_ALL :{LTBLUE}New global pathfinding (NPF, overrides NTP): {ORANGE}{STRING1} +STR_CONFIG_PATCHES_AUTO_SEMAPHORES_PRE_DATE :{LTBLUE}Automatically build semaphores before: {ORANGE}{STRING1} STR_CONFIG_PATCHES_FREIGHT_TRAINS :{LTBLUE}Weight multiplier for freight to simulate heavy trains: {ORANGE}{STRING} STR_CONFIG_PATCHES_SMALL_AIRPORTS :{LTBLUE}Always allow small airports: {ORANGE}{STRING1} Index: rail_cmd.c =================================================================== --- rail_cmd.c (revision 7559) +++ rail_cmd.c (working copy) @@ -32,6 +32,7 @@ #include "newgrf_callbacks.h" #include "newgrf_station.h" #include "train.h" +#include "date.h" const byte _track_sloped_sprites[14] = { 14, 15, 22, 13, @@ -654,6 +655,13 @@ sigvar = HASBIT(p1, 3) ? SIG_SEMAPHORE : SIG_ELECTRIC; pre_signal = HASBIT(p1, 3); + /* If the current year is before the Light Signals introduction year + * then inerchange Light and Semaphore signals. + * Also do this if the option is set > 2010 ie Always build semaphores default. */ + if ((_cur_year < _patches.semaphore_pre_year) + || (_patches.semaphore_pre_year > 2010)) + sigvar = (sigvar == SIG_SEMAPHORE) ? SIG_ELECTRIC : SIG_SEMAPHORE; + if (!ValParamTrackOrientation(track) || !IsTileType(tile, MP_RAILWAY) || !EnsureNoVehicle(tile)) return CMD_ERROR; Index: settings.c =================================================================== --- settings.c (revision 7559) +++ settings.c (working copy) @@ -1290,6 +1290,7 @@ SDT_BOOL(Patches, signal_side, N, 0, true, STR_CONFIG_PATCHES_SIGNALSIDE, RedrawScreen), SDT_BOOL(Patches, always_small_airport, 0, 0, false, STR_CONFIG_PATCHES_SMALL_AIRPORTS, NULL), SDT_VAR(Patches, drag_signals_density,SLE_UINT8,S, 0, 4, 1, 20, 0, STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY,NULL), + SDT_VAR(Patches, semaphore_pre_year, SLE_UINT16,0,NC, 1975, MIN_YEAR, 2015,5, STR_CONFIG_PATCHES_AUTO_SEMAPHORES_PRE_DATE,NULL), /***************************************************************************/ /* Vehicle section of the GUI-configure patches window */ Index: variables.h =================================================================== --- variables.h (revision 7559) +++ variables.h (working copy) @@ -85,6 +85,7 @@ bool modified_catchment; // different-size catchment areas bool vehicle_speed; // show vehicle speed bool build_on_slopes; // allow building on slopes + uint16 semaphore_pre_year; // automatic semaphores before set date bool mammoth_trains; // allow very long trains bool join_stations; // allow joining of train stations bool full_load_any; // new full load calculation, any cargo must be full Index: settings_gui.c =================================================================== --- settings_gui.c (revision 7559) +++ settings_gui.c (working copy) @@ -583,6 +583,7 @@ "always_small_airport", "drag_signals_density", "oil_refinery_limit", + "semaphore_pre_year", }; static const char *_patches_stations[] = {