equal
deleted
inserted
replaced
721 |
721 |
722 rvi = RailVehInfo(p1); |
722 rvi = RailVehInfo(p1); |
723 e = GetEngine(p1); |
723 e = GetEngine(p1); |
724 |
724 |
725 /* Check if depot and new engine uses the same kind of tracks */ |
725 /* Check if depot and new engine uses the same kind of tracks */ |
726 if (!IsCompatibleRail(e->railtype, GetRailType(tile))) return CMD_ERROR; |
726 /* We need to see if the engine got power on the tile to avoid eletric engines in non-electric depots */ |
|
727 if (!HasPowerOnRail(e->railtype, GetRailType(tile))) return CMD_ERROR; |
727 |
728 |
728 if (rvi->flags & RVI_WAGON) return CmdBuildRailWagon(p1, tile, flags); |
729 if (rvi->flags & RVI_WAGON) return CmdBuildRailWagon(p1, tile, flags); |
729 |
730 |
730 value = EstimateTrainCost(rvi); |
731 value = EstimateTrainCost(rvi); |
731 |
732 |