COMMANDER

- Added OPS transport (untested)
This commit is contained in:
Frank
2021-09-13 08:31:00 +02:00
parent 6a6cb1961d
commit 1d0eb9806d
9 changed files with 672 additions and 257 deletions

View File

@@ -1374,16 +1374,17 @@ end
-- @param Wrapper.Airbase#AIRBASE.ParkingSpot Spot Parking Spot.
function FLIGHTGROUP:onafterElementParking(From, Event, To, Element, Spot)
-- Set parking spot.
if Spot then
self:_SetElementParkingAt(Element, Spot)
end
-- Debug info.
self:T(self.lid..string.format("Element parking %s at spot %s", Element.name, Element.parking and tostring(Element.parking.TerminalID) or "N/A"))
-- Set element status.
self:_UpdateStatus(Element, OPSGROUP.ElementStatus.PARKING)
if Spot then
self:_SetElementParkingAt(Element, Spot)
end
if self:IsTakeoffCold() then
-- Wait for engine startup event.
elseif self:IsTakeoffHot() then
@@ -1660,11 +1661,16 @@ end
-- @param #string Event Event.
-- @param #string To To state.
function FLIGHTGROUP:onafterParking(From, Event, To)
self:T(self.lid..string.format("Flight is parking"))
-- Get closest airbase
local airbase=self:GetClosestAirbase() --self.group:GetCoordinate():GetClosestAirbase()
local airbasename=airbase:GetName() or "unknown"
-- Debug info
self:T(self.lid..string.format("Flight is parking at airbase %s", airbasename))
-- Set current airbase.
self.currbase=airbase
-- Parking time stamp.
self.Tparking=timer.getAbsTime()