equal
deleted
inserted
replaced
672 Engine *e; |
672 Engine *e; |
673 TileIndex tile = TileVirtXY(x, y); |
673 TileIndex tile = TileVirtXY(x, y); |
674 uint num_vehicles; |
674 uint num_vehicles; |
675 |
675 |
676 /* Check if the engine-type is valid (for the player) */ |
676 /* Check if the engine-type is valid (for the player) */ |
677 if (!IsEngineBuildable(p1, VEH_Train)) return CMD_ERROR; |
677 if (!IsEngineBuildable(p1, VEH_Train)) return_cmd_error(STR_ENGINE_NOT_BUILDABLE); |
678 |
678 |
679 /* Check if the train is actually being built in a depot belonging |
679 /* Check if the train is actually being built in a depot belonging |
680 * to the player. Doesn't matter if only the cost is queried */ |
680 * to the player. Doesn't matter if only the cost is queried */ |
681 if (!(flags & DC_QUERY_COST)) { |
681 if (!(flags & DC_QUERY_COST)) { |
682 if (!IsTileDepotType(tile, TRANSPORT_RAIL)) return CMD_ERROR; |
682 if (!IsTileDepotType(tile, TRANSPORT_RAIL)) return CMD_ERROR; |