Add error messages for vehicle build failure due to wrong depot owner and rail type
This commit is contained in:
@@ -940,7 +940,7 @@ CommandCost CmdBuildRailVehicle(TileIndex tile, DoCommandFlag flags, const Engin
|
||||
|
||||
/* Check if depot and new engine uses the same kind of tracks *
|
||||
* We need to see if the engine got power on the tile to avoid electric engines in non-electric depots */
|
||||
if (!HasPowerOnRail(rvi->railtype, GetRailType(tile))) return CMD_ERROR;
|
||||
if (!HasPowerOnRail(rvi->railtype, GetRailType(tile))) return_cmd_error(STR_ERROR_DEPOT_HAS_WRONG_RAIL_TYPE);
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
DiagDirection dir = GetRailDepotDirection(tile);
|
||||
|
Reference in New Issue
Block a user