diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000..b179567118 Binary files /dev/null and b/.DS_Store differ diff --git a/src/economy.cpp b/src/economy.cpp index ddd2cf9e4c..75c7905d24 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1612,7 +1612,7 @@ static void ReserveConsist(Station *st, Vehicle *u, CargoArray *consist_capleft, */ static void UpdateLoadUnloadTicks(Vehicle *front, const Station *st, int ticks) { - if (front->type == VEH_TRAIN) { + if (front->type == VEH_TRAIN && _settings_game.order.station_length_loading_penalty) { /* Each platform tile is worth 2 rail vehicles. */ int overhang = front->GetGroundVehicleCache()->cached_total_length - st->GetPlatformLength(front->tile) * TILE_SIZE; if (overhang > 0) { diff --git a/src/lang/english.txt b/src/lang/english.txt index 7c1c6ae2e6..09aac5258a 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1777,6 +1777,9 @@ STR_CONFIG_SETTING_SERVINT_DISABLED :Disabled STR_CONFIG_SETTING_NOSERVICE :Disable servicing when breakdowns set to none: {STRING2} STR_CONFIG_SETTING_NOSERVICE_HELPTEXT :When enabled, vehicles do not get serviced if they cannot break down +STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY :Loading speed penalty for trains that are longer than the station: {STRING2} +STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY_HELPTEXT :When enabled, trains which are too long for the station load more slowly than a train which fits the station. This setting does not affect pathfinding. + STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Enable wagon speed limits: {STRING2} STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT :When enabled, also use speed limits of wagons for deciding the maximum speed of a train diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 47b2bf833b..23f0000189 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1918,6 +1918,7 @@ static SettingsContainer &GetSettingsTree() limitations->Add(new SettingEntry("construction.road_stop_on_competitor_road")); limitations->Add(new SettingEntry("construction.crossing_with_competitor")); limitations->Add(new SettingEntry("vehicle.disable_elrails")); + limitations->Add(new SettingEntry("order.station_length_loading_penalty")); } SettingsPage *disasters = main->Add(new SettingsPage(STR_CONFIG_SETTING_ACCIDENTS)); diff --git a/src/settings_type.h b/src/settings_type.h index 8ac229ed72..8e9c40e3f1 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -501,6 +501,7 @@ struct OrderSettings { bool selectgoods; ///< only send the goods to station if a train has been there bool no_servicing_if_no_breakdowns; ///< don't send vehicles to depot when breakdowns are disabled bool serviceathelipad; ///< service helicopters at helipads automatically (no need to send to depot) + bool station_length_loading_penalty; ///< make trains longer than the station load more slowly }; /** Settings related to vehicles. */ diff --git a/src/table/settings/game_settings.ini b/src/table/settings/game_settings.ini index 7c4fdf51c9..7902d17a4c 100644 --- a/src/table/settings/game_settings.ini +++ b/src/table/settings/game_settings.ini @@ -78,6 +78,13 @@ str = STR_CONFIG_SETTING_SERVICEATHELIPAD strhelp = STR_CONFIG_SETTING_SERVICEATHELIPAD_HELPTEXT cat = SC_EXPERT +[SDT_BOOL] +var = order.station_length_loading_penalty +def = true +str = STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY +strhelp = STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY_HELPTEXT +cat = SC_EXPERT + [SDT_BOOL] var = order.gradual_loading from = SLV_40