Add error messages for vehicle build failure due to wrong depot owner and rail type

This commit is contained in:
Jonathan G Rennison
2019-05-18 13:19:43 +01:00
parent ee06258629
commit 8042150a35
3 changed files with 6 additions and 3 deletions

View File

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