Add setting to enable flipping direction of all train types in depot

This commit is contained in:
Jonathan G Rennison
2018-09-11 06:08:02 +01:00
parent ce6d6db4d5
commit ce4e2ca3c3
5 changed files with 15 additions and 1 deletions

View File

@@ -2254,7 +2254,7 @@ CommandCost CmdReverseTrainDirection(TileIndex tile, DoCommandFlag flags, uint32
if (v->IsMultiheaded() || HasBit(EngInfo(v->engine_type)->callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) {
return_cmd_error(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS);
}
if (!HasBit(EngInfo(v->engine_type)->misc_flags, EF_RAIL_FLIPS)) return CMD_ERROR;
if (!HasBit(EngInfo(v->engine_type)->misc_flags, EF_RAIL_FLIPS) && !_settings_game.vehicle.flip_direction_all_trains) return CMD_ERROR;
Train *front = v->First();
/* make sure the vehicle is stopped in the depot */