equal
deleted
inserted
replaced
879 return _price.build_rail / 2; |
879 return _price.build_rail / 2; |
880 } |
880 } |
881 |
881 |
882 extern int32 DoConvertStationRail(TileIndex tile, RailType totype, bool exec); |
882 extern int32 DoConvertStationRail(TileIndex tile, RailType totype, bool exec); |
883 extern int32 DoConvertStreetRail(TileIndex tile, RailType totype, bool exec); |
883 extern int32 DoConvertStreetRail(TileIndex tile, RailType totype, bool exec); |
884 extern int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec); |
884 extern int32 DoConvertTunnelRail(TileIndex tile, RailType totype, bool exec); |
|
885 extern int32 DoConvertBridgeRail(TileIndex tile, RailType totype, bool exec); |
885 |
886 |
886 /** Convert one rail type to the other. You can convert normal rail to |
887 /** Convert one rail type to the other. You can convert normal rail to |
887 * monorail/maglev easily or vice-versa. |
888 * monorail/maglev easily or vice-versa. |
888 * @param tile end tile of rail conversion drag |
889 * @param tile end tile of rail conversion drag |
889 * @param p1 start tile of drag |
890 * @param p1 start tile of drag |
920 |
921 |
921 switch (GetTileType(tile)) { |
922 switch (GetTileType(tile)) { |
922 case MP_RAILWAY: proc = DoConvertRail; break; |
923 case MP_RAILWAY: proc = DoConvertRail; break; |
923 case MP_STATION: proc = DoConvertStationRail; break; |
924 case MP_STATION: proc = DoConvertStationRail; break; |
924 case MP_STREET: proc = DoConvertStreetRail; break; |
925 case MP_STREET: proc = DoConvertStreetRail; break; |
925 case MP_TUNNEL: proc = DoConvertTunnelBridgeRail; break; |
926 case MP_TUNNEL: proc = DoConvertTunnelRail; break; |
926 case MP_RAILWAY_BRIDGE: proc = DoConvertTunnelBridgeRail; break; |
927 case MP_RAILWAY_BRIDGE: proc = DoConvertBridgeRail; break; |
927 default: continue; |
928 default: continue; |
928 } |
929 } |
929 |
930 |
930 ret = proc(tile, p2, false); |
931 ret = proc(tile, p2, false); |
931 if (CmdFailed(ret)) continue; |
932 if (CmdFailed(ret)) continue; |