Changeset - r28390:f9c7a9093cd1
[Not reviewed]
master
0 5 1
EmperorJake - 4 months ago 2024-01-04 12:03:11
68182631+EmperorJake@users.noreply.github.com
Feature: Setting to disable the loading speed penalty for trains longer than the station
6 files changed with 13 insertions and 1 deletions:
0 comments (0 inline, 0 general)
.DS_Store
Show inline comments
 
new file 100644
 
binary diff not shown
src/economy.cpp
Show inline comments
 
@@ -1612,7 +1612,7 @@ static void ReserveConsist(Station *st, 
 
 */
 
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) {
src/lang/english.txt
Show inline comments
 
@@ -1777,6 +1777,9 @@ STR_CONFIG_SETTING_SERVINT_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
 

	
src/settings_gui.cpp
Show inline comments
 
@@ -1918,6 +1918,7 @@ static SettingsContainer &GetSettingsTre
 
			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));
src/settings_type.h
Show inline comments
 
@@ -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. */
src/table/settings/game_settings.ini
Show inline comments
 
@@ -79,6 +79,13 @@ strhelp  = STR_CONFIG_SETTING_SERVICEATH
 
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
 
flags    = SF_NO_NETWORK
0 comments (0 inline, 0 general)