1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-22 05:59:10 +00:00

(svn r19463) -Codechange: add helper function to determine if an airport has at least one hangar

This commit is contained in:
yexo
2010-03-19 09:48:44 +00:00
parent 81ca0e28c4
commit 414071d07f
4 changed files with 12 additions and 9 deletions

View File

@@ -535,7 +535,7 @@ CommandCost CmdInsertOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
ret.SetGlobalErrorMessage();
if (ret.Failed()) return ret;
if (!CanVehicleUseStation(v, st) || st->airport.GetSpec()->nof_depots == 0) {
if (!CanVehicleUseStation(v, st) || !st->airport.HasHangar()) {
return CMD_ERROR;
}
} else {