Feature: Setting to disable the loading speed penalty for trains longer than the station

wip-string
EmperorJake 5 months ago committed by rubidium42
parent e3f49ee7a0
commit 6522351a1f

BIN
.DS_Store vendored

Binary file not shown.

@ -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) {

@ -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

@ -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));

@ -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. */

@ -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

Loading…
Cancel
Save