Update Warehouse.lua

- added airbase coalition check when spawning aircraft #1413
This commit is contained in:
Frank 2020-12-29 22:28:36 +01:00
parent 6e35b80daf
commit 1bb70b8697

View File

@ -7181,7 +7181,7 @@ function WAREHOUSE:_CheckRequestNow(request)
-- Check available parking for air asset units.
if _assetcategory==Group.Category.AIRPLANE or _assetcategory==Group.Category.HELICOPTER then
if self.airbase then
if self.airbase and self.airbase:GetCoalition()==self:GetCoalition() then
if self:IsRunwayOperational() then
@ -7233,7 +7233,7 @@ function WAREHOUSE:_CheckRequestNow(request)
-- Check available parking for transport units.
if _transportcategory==Group.Category.AIRPLANE or _transportcategory==Group.Category.HELICOPTER then
if self.airbase then
if self.airbase and self.airbase:GetCoalition()==self:GetCoalition() then
if self:IsRunwayOperational() then