Changeset - r28390:f9c7a9093cd1
[Not reviewed]
master
0 5 1
EmperorJake - 11 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
 
@@ -1609,13 +1609,13 @@ static void ReserveConsist(Station *st, 
 
 * @param front The vehicle to be updated.
 
 * @param st The station the vehicle is loading at.
 
 * @param ticks The time it would normally wait, based on cargo loaded and unloaded.
 
 */
 
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) {
 
			ticks <<= 1;
 
			ticks += (overhang * ticks) / 8;
 
		}
src/lang/english.txt
Show inline comments
 
@@ -1774,12 +1774,15 @@ STR_CONFIG_SETTING_SERVINT_VALUE        
 
###setting-zero-is-special
 
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
 

	
 
STR_CONFIG_SETTING_DISABLE_ELRAILS                              :Disable electric rails: {STRING2}
 
STR_CONFIG_SETTING_DISABLE_ELRAILS_HELPTEXT                     :Enabling this setting disables the requirement to electrify tracks to make electric engines run on them
 

	
src/settings_gui.cpp
Show inline comments
 
@@ -1915,12 +1915,13 @@ static SettingsContainer &GetSettingsTre
 
			limitations->Add(new SettingEntry("station.station_spread"));
 
			limitations->Add(new SettingEntry("station.distant_join_stations"));
 
			limitations->Add(new SettingEntry("construction.road_stop_on_town_road"));
 
			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));
 
		{
 
			disasters->Add(new SettingEntry("difficulty.disasters"));
 
			disasters->Add(new SettingEntry("difficulty.economy"));
src/settings_type.h
Show inline comments
 
@@ -498,12 +498,13 @@ struct PathfinderSettings {
 
struct OrderSettings {
 
	bool   improved_load;                    ///< improved loading algorithm
 
	bool   gradual_loading;                  ///< load vehicles gradually
 
	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. */
 
struct VehicleSettings {
 
	uint8_t  max_train_length;                 ///< maximum length for trains
 
	uint8_t  smoke_amount;                     ///< amount of smoke/sparks locomotives produce
src/table/settings/game_settings.ini
Show inline comments
 
@@ -76,12 +76,19 @@ var      = order.serviceathelipad
 
def      = true
 
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
 
flags    = SF_NO_NETWORK
 
def      = true
 
cat      = SC_EXPERT
 

	
0 comments (0 inline, 0 general)