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

This commit is contained in:
EmperorJake
2024-01-04 23:03:11 +11:00
committed by rubidium42
parent e3f49ee7a0
commit 6522351a1f
6 changed files with 13 additions and 1 deletions

View File

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