Change TunnelBridgeIsFree across_only to a mode enum type
This commit is contained in:
@@ -1496,7 +1496,7 @@ CommandCost CmdBuildSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
if (!ValParamTrackOrientation(track) || !IsTrackAcrossTunnelBridge(tile, track)) {
|
||||
return_cmd_error(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK);
|
||||
}
|
||||
CommandCost ret = TunnelBridgeIsFree(tile, GetOtherTunnelBridgeEnd(tile), nullptr, true);
|
||||
CommandCost ret = TunnelBridgeIsFree(tile, GetOtherTunnelBridgeEnd(tile), nullptr, TBIFM_ACROSS_ONLY);
|
||||
if (ret.Failed()) return ret;
|
||||
} else if (!ValParamTrackOrientation(track) || !IsPlainRailTile(tile) || !HasTrack(tile, track)) {
|
||||
return_cmd_error(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK);
|
||||
@@ -2185,7 +2185,7 @@ CommandCost CmdRemoveSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1
|
||||
}
|
||||
if (!IsTunnelBridgeWithSignalSimulation(tile)) return_cmd_error(STR_ERROR_THERE_ARE_NO_SIGNALS);
|
||||
TileIndex end = GetOtherTunnelBridgeEnd(tile);
|
||||
CommandCost ret = TunnelBridgeIsFree(tile, end, nullptr, true);
|
||||
CommandCost ret = TunnelBridgeIsFree(tile, end, nullptr, TBIFM_ACROSS_ONLY);
|
||||
if (ret.Failed()) return ret;
|
||||
|
||||
cost *= GetTunnelBridgeSignalSimulationSignalCount(tile, end);
|
||||
|
Reference in New Issue
Block a user