Fix #11629: AirportGetNearestTown for rotated airports (#11631)

Add rotation parameter to AirportGetNearestTown
Add wrapper for existing stations
Remove unnecessary iterator cloning
This commit is contained in:
Jonathan G Rennison
2023-12-28 21:43:05 +00:00
committed by GitHub
parent 33ff64ef74
commit 3b18877b87
3 changed files with 32 additions and 21 deletions

View File

@@ -16,7 +16,7 @@
enum StationClassID : byte;
enum RoadStopClassID : byte;
extern Town *AirportGetNearestTown(const struct AirportSpec *as, TileIndex tile, const TileIterator &it, uint &mindist);
extern Town *AirportGetNearestTown(const struct AirportSpec *as, Direction rotation, TileIndex tile, TileIterator &&it, uint &mindist);
extern uint8_t GetAirportNoiseLevelForDistance(const struct AirportSpec *as, uint distance);
CommandCost CmdBuildAirport(DoCommandFlag flags, TileIndex tile, byte airport_type, byte layout, StationID station_to_join, bool allow_adjacent);