Return error when upgrading airport to an identical configuration

See: #200
pull/203/head
Jonathan G Rennison 4 years ago
parent 9909f9ab54
commit 67506e3781

@ -2467,6 +2467,10 @@ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
return_cmd_error(STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT);
}
if (action == AIRPORT_UPGRADE && airport_type == st->airport.type && layout == st->airport.layout && st->airport.tile == tile) {
return_cmd_error(STR_ERROR_ALREADY_BUILT);
}
/* The noise level is the noise from the airport and reduce it to account for the distance to the town center. */
uint dist;
Town *nearest = AirportGetNearestTown(as, iter, dist);

Loading…
Cancel
Save