- Added black and white parking spot lists.
This commit is contained in:
Frank
2021-01-12 13:49:35 +01:00
parent ae6613fae1
commit 94f206af68
3 changed files with 113 additions and 21 deletions

View File

@@ -2611,8 +2611,10 @@ end
--- Check parking ID.
-- @param #WAREHOUSE self
-- @param Wrapper.Airbase#AIRBASE.ParkingSpot spot Parking spot.
-- @param Wrapper.Airbase#AIRBASE airbase The airbase.
-- @return #boolean If true, parking is valid.
function WAREHOUSE:_CheckParkingValid(spot)
function WAREHOUSE:_CheckParkingValid(spot, airbase)
if self.parkingIDs==nil then
return true
end
@@ -7667,7 +7669,7 @@ function WAREHOUSE:_FindParkingForAssets(airbase, assets)
local parkingspot=_parkingspot --Wrapper.Airbase#AIRBASE.ParkingSpot
-- Check correct terminal type for asset. We don't want helos in shelters etc.
if AIRBASE._CheckTerminalType(parkingspot.TerminalType, terminaltype) and self:_CheckParkingValid(parkingspot) then
if AIRBASE._CheckTerminalType(parkingspot.TerminalType, terminaltype) and self:_CheckParkingValid(parkingspot, airbase) and airbase:_CheckParkingLists(parkingspot.TerminalID) then
-- Coordinate of the parking spot.
local _spot=parkingspot.Coordinate -- Core.Point#COORDINATE