mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Merge branch 'signal_tunnels_bridges' into signal_tunnels_bridges-sx
This commit is contained in:
commit
a5f00c1df5
@ -1018,7 +1018,9 @@ CommandCost CmdBuildSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
if (IsTileType(tile, MP_TUNNELBRIDGE)) {
|
||||
if (GetTunnelBridgeTransportType(tile) != TRANSPORT_RAIL) return CMD_ERROR;
|
||||
CommandCost ret = EnsureNoTrainOnTrack(GetOtherTunnelBridgeEnd(tile), track);
|
||||
//if (ret.Failed()) return ret;
|
||||
if (ret.Failed()) return ret;
|
||||
ret = EnsureNoTrainOnTrack(tile, track);
|
||||
if (ret.Failed()) return ret;
|
||||
} else if (!ValParamTrackOrientation(track) || !IsPlainRailTile(tile) || !HasTrack(tile, track)) {
|
||||
return_cmd_error(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK);
|
||||
}
|
||||
@ -1485,6 +1487,8 @@ CommandCost CmdRemoveSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1
|
||||
|
||||
CommandCost ret = EnsureNoTrainOnTrack(GetOtherTunnelBridgeEnd(tile), track);
|
||||
if (ret.Failed()) return ret;
|
||||
ret = EnsureNoTrainOnTrack(tile, track);
|
||||
if (ret.Failed()) return ret;
|
||||
} else {
|
||||
if (!ValParamTrackOrientation(track) || !IsPlainRailTile(tile) || !HasTrack(tile, track)) {
|
||||
return_cmd_error(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK);
|
||||
|
Loading…
Reference in New Issue
Block a user