Return error when upgrading airport to an identical configuration
See: #200
This commit is contained in:
@@ -2467,6 +2467,10 @@ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
|
|||||||
return_cmd_error(STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT);
|
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. */
|
/* The noise level is the noise from the airport and reduce it to account for the distance to the town center. */
|
||||||
uint dist;
|
uint dist;
|
||||||
Town *nearest = AirportGetNearestTown(as, iter, dist);
|
Town *nearest = AirportGetNearestTown(as, iter, dist);
|
||||||
|
Reference in New Issue
Block a user