Codechange: Un-bitstuff station/depot/waypoint commands.

This commit is contained in:
Michael Lutz
2021-11-14 16:39:17 +01:00
parent 21675ec7e2
commit 6fe445e6c0
28 changed files with 218 additions and 333 deletions

View File

@@ -77,9 +77,7 @@
EnforcePrecondition(false, IsValidAirportType(type));
EnforcePrecondition(false, station_id == ScriptStation::STATION_NEW || station_id == ScriptStation::STATION_JOIN_ADJACENT || ScriptStation::IsValidStation(station_id));
uint p2 = station_id == ScriptStation::STATION_JOIN_ADJACENT ? 0 : 1;
p2 |= (ScriptStation::IsValidStation(station_id) ? station_id : INVALID_STATION) << 16;
return ScriptObject::Command<CMD_BUILD_AIRPORT>::Do(tile, type, p2, {});
return ScriptObject::Command<CMD_BUILD_AIRPORT>::Do(tile, type, 0, (ScriptStation::IsValidStation(station_id) ? station_id : INVALID_STATION), station_id == ScriptStation::STATION_JOIN_ADJACENT);
}
/* static */ bool ScriptAirport::RemoveAirport(TileIndex tile)