Update Airbase.lua

- Register oil rigs and gas platforms as helipads. DCS bug registers them as ship (Airbase.Category.SHIP instead of Airbase.Category.HELIPAD).
This commit is contained in:
Frank 2021-09-29 09:00:53 +02:00
parent 1832125022
commit 0daac876ea

View File

@ -547,6 +547,12 @@ function AIRBASE:Register(AirbaseName)
self.isHelipad=true
elseif self.category==Airbase.Category.SHIP then
self.isShip=true
-- DCS bug: Oil rigs and gas platforms have category=2 (ship). Also they cannot be retrieved by coalition.getStaticObjects()
if self.descriptors.typeName=="Oil rig" or self.descriptors.typeName=="Ga" then
self.isHelipad=true
self.isShip=false
self.category=Airbase.Category.HELIPAD
_DATABASE:AddStatic(AirbaseName)
else
self:E("ERROR: Unknown airbase category!")
end