mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-21 21:17:30 +00:00
FLIGHTGROUP v0.0.2
- Proper flight status.
This commit is contained in:
@@ -76,6 +76,7 @@ FLIGHTGROUP.ElementStatus={
|
|||||||
-- @field #boolean ai If true, element is AI.
|
-- @field #boolean ai If true, element is AI.
|
||||||
-- @field #string skill Skill level.
|
-- @field #string skill Skill level.
|
||||||
-- @field Wrapper.Unit#UNIT unit Element unit object.
|
-- @field Wrapper.Unit#UNIT unit Element unit object.
|
||||||
|
-- @field Wrapper.Group#GROUP group Group object of the element.
|
||||||
-- @field #string status Status, i.e. born, parking, taxiing.
|
-- @field #string status Status, i.e. born, parking, taxiing.
|
||||||
|
|
||||||
--- Flight group tasks.
|
--- Flight group tasks.
|
||||||
@@ -112,7 +113,7 @@ FLIGHTGROUP.Mission={
|
|||||||
|
|
||||||
--- FLIGHTGROUP class version.
|
--- FLIGHTGROUP class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
FLIGHTGROUP.version="0.0.1"
|
FLIGHTGROUP.version="0.0.2"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO list
|
-- TODO list
|
||||||
@@ -144,28 +145,6 @@ function FLIGHTGROUP:New(groupname)
|
|||||||
-- Start State.
|
-- Start State.
|
||||||
self:SetStartState("Stopped")
|
self:SetStartState("Stopped")
|
||||||
|
|
||||||
-- Check if the group is already alive and if so, add its elements.
|
|
||||||
local group=GROUP:FindByName(groupname)
|
|
||||||
if group and group:IsAlive() then
|
|
||||||
self.flightgroup=group
|
|
||||||
local units=group:GetUnits()
|
|
||||||
for _,_unit in pairs(units) do
|
|
||||||
local unit=_unit --Wrapper.Unit#UNIT
|
|
||||||
local element=self:AddElementByName(unit:GetName())
|
|
||||||
|
|
||||||
-- Trigger Spawned event.
|
|
||||||
element.status=FLIGHTGROUP.ElementStatus.SPAWNED
|
|
||||||
self:ElementSpawned(element)
|
|
||||||
|
|
||||||
-- Trigger Airborne event if unit was spawned in air.
|
|
||||||
if unit:InAir() then
|
|
||||||
element.status=FLIGHTGROUP.ElementStatus.AIRBORNE
|
|
||||||
self:ElementAirborne(element)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Init set of detected units.
|
-- Init set of detected units.
|
||||||
self.detectedunits=SET_UNIT:New()
|
self.detectedunits=SET_UNIT:New()
|
||||||
|
|
||||||
@@ -234,7 +213,22 @@ function FLIGHTGROUP:New(groupname)
|
|||||||
BASE:TraceLevel(1)
|
BASE:TraceLevel(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Check if the group is already alive and if so, add its elements.
|
||||||
|
local group=GROUP:FindByName(groupname)
|
||||||
|
if group and group:IsAlive() then
|
||||||
|
self.flightgroup=group
|
||||||
|
local units=group:GetUnits()
|
||||||
|
for _,_unit in pairs(units) do
|
||||||
|
local unit=_unit --Wrapper.Unit#UNIT
|
||||||
|
local element=self:AddElementByName(unit:GetName())
|
||||||
|
|
||||||
|
-- Trigger Spawned event.
|
||||||
|
self:__ElementSpawned(0.1, element)
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Autostart.
|
||||||
self:Start()
|
self:Start()
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@@ -347,6 +341,9 @@ function FLIGHTGROUP:onafterFlightStatus(From, Event, To)
|
|||||||
local text=string.format("Flight group FSM status %s.", fsmstate)
|
local text=string.format("Flight group FSM status %s.", fsmstate)
|
||||||
self:I(self.sid..text)
|
self:I(self.sid..text)
|
||||||
|
|
||||||
|
|
||||||
|
--TODO: check each element if it is alive?! despawn on runway etc.
|
||||||
|
|
||||||
text="Elements:"
|
text="Elements:"
|
||||||
for i,_element in pairs(self.element) do
|
for i,_element in pairs(self.element) do
|
||||||
local element=_element --#FLIGHTGROUP.Element
|
local element=_element --#FLIGHTGROUP.Element
|
||||||
@@ -367,7 +364,7 @@ function FLIGHTGROUP:onafterFlightStatus(From, Event, To)
|
|||||||
local detectedtargets=self.flightgroup:GetDetectedTargets()
|
local detectedtargets=self.flightgroup:GetDetectedTargets()
|
||||||
|
|
||||||
local detected={}
|
local detected={}
|
||||||
for DetectionObjectID, Detection in pairs(detectedtargets) do
|
for DetectionObjectID, Detection in pairs(detectedtargets or {}) do
|
||||||
local DetectedObject=Detection.object -- DCS#Object
|
local DetectedObject=Detection.object -- DCS#Object
|
||||||
|
|
||||||
if DetectedObject and DetectedObject:isExist() and DetectedObject.id_<50000000 then
|
if DetectedObject and DetectedObject:isExist() and DetectedObject.id_<50000000 then
|
||||||
@@ -377,7 +374,7 @@ function FLIGHTGROUP:onafterFlightStatus(From, Event, To)
|
|||||||
local unitname=unit:GetName()
|
local unitname=unit:GetName()
|
||||||
if self.detectedunits:FindUnit(unitname) then
|
if self.detectedunits:FindUnit(unitname) then
|
||||||
-- Unit is already in the detected unit set.
|
-- Unit is already in the detected unit set.
|
||||||
self:I(self.sid..string.format("Detected unit %s is already known.", unitname))
|
self:T(self.sid..string.format("Detected unit %s is already known.", unitname))
|
||||||
else
|
else
|
||||||
self:AddDetectedUnit(unit)
|
self:AddDetectedUnit(unit)
|
||||||
end
|
end
|
||||||
@@ -422,8 +419,9 @@ function FLIGHTGROUP:OnEventBirth(EventData)
|
|||||||
|
|
||||||
if not self:_IsElement(unitname) then
|
if not self:_IsElement(unitname) then
|
||||||
local element=self:AddElementByName(unitname)
|
local element=self:AddElementByName(unitname)
|
||||||
self:_UpdateStatus(element, FLIGHTGROUP.ElementStatus.SPAWNED)
|
self:ElementSpawned(element)
|
||||||
self:I(self.sid..string.format("Element %s spawned", element.name))
|
--self:_UpdateStatus(element, FLIGHTGROUP.ElementStatus.SPAWNED)
|
||||||
|
--self:I(self.sid..string.format("Element %s spawned", element.name))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -444,9 +442,10 @@ function FLIGHTGROUP:OnEventEngineStartup(EventData)
|
|||||||
-- Get element.
|
-- Get element.
|
||||||
local element=self:GetElementByName(unitname)
|
local element=self:GetElementByName(unitname)
|
||||||
|
|
||||||
if element then
|
if element then
|
||||||
self:_UpdateStatus(element, FLIGHTGROUP.ElementStatus.TAXIING)
|
|
||||||
self:I(self.sid..string.format("Element %s started engines ==> taxiing", element.name))
|
self:I(self.sid..string.format("Element %s started engines ==> taxiing", element.name))
|
||||||
|
self:ElementTaxiing(element)
|
||||||
|
--self:_UpdateStatus(element, FLIGHTGROUP.ElementStatus.TAXIING)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -467,10 +466,9 @@ function FLIGHTGROUP:OnEventTakeOff(EventData)
|
|||||||
-- Get element.
|
-- Get element.
|
||||||
local element=self:GetElementByName(unitname)
|
local element=self:GetElementByName(unitname)
|
||||||
|
|
||||||
if element then
|
if element then
|
||||||
self:_UpdateStatus(element, FLIGHTGROUP.ElementStatus.AIRBORNE)
|
self:I(self.sid..string.format("EVENT: Element %s took off ==> airborne", element.name))
|
||||||
self:ElementTakeoff(element)
|
self:ElementAirborne(element)
|
||||||
self:I(self.sid..string.format("Element %s took off ==> airborne", element.name))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -492,9 +490,8 @@ function FLIGHTGROUP:OnEventLanding(EventData)
|
|||||||
local element=self:GetElementByName(unitname)
|
local element=self:GetElementByName(unitname)
|
||||||
|
|
||||||
if element then
|
if element then
|
||||||
self:_UpdateStatus(element, FLIGHTGROUP.ElementStatus.LANDED)
|
self:I(self.sid..string.format("EVENT: Element %s landed ==> landed", element.name))
|
||||||
self:ElementLanded(element)
|
self:ElementLanded(element)
|
||||||
self:I(self.sid..string.format("Element %s landed", element.name))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -520,12 +517,12 @@ function FLIGHTGROUP:OnEventEngineShutdown(EventData)
|
|||||||
local airbase=coord:GetClosestAirbase()
|
local airbase=coord:GetClosestAirbase()
|
||||||
local _,_,dist,parking=coord:GetClosestParkingSpot(airbase)
|
local _,_,dist,parking=coord:GetClosestParkingSpot(airbase)
|
||||||
if dist and dist<10 and unit:InAir()==false then
|
if dist and dist<10 and unit:InAir()==false then
|
||||||
self:_UpdateStatus(element, FLIGHTGROUP.ElementStatus.ARRIVED)
|
--self:_UpdateStatus(element, FLIGHTGROUP.ElementStatus.ARRIVED)
|
||||||
self:ElementArrived(element)
|
self:ElementArrived(element)
|
||||||
self:I(self.sid..string.format("Element %s shut down engines ==> arrived", element.name))
|
self:I(self.sid..string.format("Element %s shut down engines ==> arrived", element.name))
|
||||||
else
|
else
|
||||||
element.status=FLIGHTGROUP.ElementStatus.DEAD
|
self:I(self.sid..string.format("Element %s shut down engines (in air) ==> dead", element.name))
|
||||||
self:I(self.sid..string.format("Element %s started engines (in air) ==> dead", element.name))
|
self:ElementDead(element)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -549,9 +546,8 @@ function FLIGHTGROUP:OnEventCrash(EventData)
|
|||||||
local element=self:GetElementByName(unitname)
|
local element=self:GetElementByName(unitname)
|
||||||
|
|
||||||
if element then
|
if element then
|
||||||
self:_UpdateStatus(element, FLIGHTGROUP.ElementStatus.DEAD)
|
|
||||||
self:ElementDead(element)
|
|
||||||
self:I(self.sid..string.format("Element %s crashed ==> dead", element.name))
|
self:I(self.sid..string.format("Element %s crashed ==> dead", element.name))
|
||||||
|
self:ElementDead(element)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -562,6 +558,91 @@ end
|
|||||||
-- FSM functions
|
-- FSM functions
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--- On after "ElementSpawned" event.
|
||||||
|
-- @param #FLIGHTGROUP self
|
||||||
|
-- @param #string From From state.
|
||||||
|
-- @param #string Event Event.
|
||||||
|
-- @param #string To To state.
|
||||||
|
-- @param #FLIGHTGROUP.Element Element The flight group element.
|
||||||
|
function FLIGHTGROUP:onafterElementSpawned(From, Event, To, Element)
|
||||||
|
self:I(self.sid..string.format("Element spawned %s.", Element.name))
|
||||||
|
|
||||||
|
-- Set element status.
|
||||||
|
self:_UpdateStatus(Element, FLIGHTGROUP.ElementStatus.SPAWNED)
|
||||||
|
|
||||||
|
if Element.unit:InAir() then
|
||||||
|
self:ElementAirborne(Element)
|
||||||
|
else
|
||||||
|
self:ElementParking(Element)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- On after "ElementParking" event.
|
||||||
|
-- @param #FLIGHTGROUP self
|
||||||
|
-- @param #string From From state.
|
||||||
|
-- @param #string Event Event.
|
||||||
|
-- @param #string To To state.
|
||||||
|
-- @param #FLIGHTGROUP.Element Element The flight group element.
|
||||||
|
function FLIGHTGROUP:onafterElementParking(From, Event, To, Element)
|
||||||
|
self:I(self.sid..string.format("Element parking %s.", Element.name))
|
||||||
|
|
||||||
|
-- Set element status.
|
||||||
|
self:_UpdateStatus(Element, FLIGHTGROUP.ElementStatus.PARKING)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- On after "ElementTaxiing" event.
|
||||||
|
-- @param #FLIGHTGROUP self
|
||||||
|
-- @param #string From From state.
|
||||||
|
-- @param #string Event Event.
|
||||||
|
-- @param #string To To state.
|
||||||
|
-- @param #FLIGHTGROUP.Element Element The flight group element.
|
||||||
|
function FLIGHTGROUP:onafterElementTaxiing(From, Event, To, Element)
|
||||||
|
self:I(self.sid..string.format("Element taxiing %s.", Element.name))
|
||||||
|
|
||||||
|
-- Set element status.
|
||||||
|
self:_UpdateStatus(Element, FLIGHTGROUP.ElementStatus.TAXIING)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- On after "ElementAirborne" event.
|
||||||
|
-- @param #FLIGHTGROUP self
|
||||||
|
-- @param #string From From state.
|
||||||
|
-- @param #string Event Event.
|
||||||
|
-- @param #string To To state.
|
||||||
|
-- @param #FLIGHTGROUP.Element Element The flight group element.
|
||||||
|
function FLIGHTGROUP:onafterElementAirborne(From, Event, To, Element)
|
||||||
|
self:I(self.sid..string.format("Element airborne %s.", Element.name))
|
||||||
|
|
||||||
|
-- Set element status.
|
||||||
|
self:_UpdateStatus(Element, FLIGHTGROUP.ElementStatus.AIRBORNE)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- On after "ElementLanded" event.
|
||||||
|
-- @param #FLIGHTGROUP self
|
||||||
|
-- @param #string From From state.
|
||||||
|
-- @param #string Event Event.
|
||||||
|
-- @param #string To To state.
|
||||||
|
-- @param #FLIGHTGROUP.Element Element The flight group element.
|
||||||
|
function FLIGHTGROUP:onafterElementLanded(From, Event, To, Element)
|
||||||
|
self:I(self.sid..string.format("Element landed %s.", Element.name))
|
||||||
|
|
||||||
|
-- Set element status.
|
||||||
|
self:_UpdateStatus(Element, FLIGHTGROUP.ElementStatus.LANDED)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- On after "ElementArrived" event.
|
||||||
|
-- @param #FLIGHTGROUP self
|
||||||
|
-- @param #string From From state.
|
||||||
|
-- @param #string Event Event.
|
||||||
|
-- @param #string To To state.
|
||||||
|
-- @param #FLIGHTGROUP.Element Element The flight group element.
|
||||||
|
function FLIGHTGROUP:onafterElementArrived(From, Event, To, Element)
|
||||||
|
self:I(self.sid..string.format("Element arrived %s.", Element.name))
|
||||||
|
|
||||||
|
-- Set element status.
|
||||||
|
self:_UpdateStatus(Element, FLIGHTGROUP.ElementStatus.ARRIVED)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- On after "DetectedUnit" event. Add newly detected unit to detected units set.
|
--- On after "DetectedUnit" event. Add newly detected unit to detected units set.
|
||||||
-- @param #FLIGHTGROUP self
|
-- @param #FLIGHTGROUP self
|
||||||
-- @param #string From From state.
|
-- @param #string From From state.
|
||||||
@@ -648,6 +729,7 @@ function FLIGHTGROUP:AddElementByName(unitname)
|
|||||||
element.name=unitname
|
element.name=unitname
|
||||||
element.unit=unit
|
element.unit=unit
|
||||||
element.status="unknown"
|
element.status="unknown"
|
||||||
|
element.group=unit:GetGroup()
|
||||||
|
|
||||||
table.insert(self.element, element)
|
table.insert(self.element, element)
|
||||||
|
|
||||||
@@ -729,43 +811,52 @@ function FLIGHTGROUP:_AllSimilarStatus(status)
|
|||||||
|
|
||||||
if status==FLIGHTGROUP.ElementStatus.SPAWNED then
|
if status==FLIGHTGROUP.ElementStatus.SPAWNED then
|
||||||
|
|
||||||
if element.status~=status or
|
-- Element SPAWNED: Nothing to check.
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.PARKING or
|
if element.status~=status then
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.TAXIING or
|
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.AIRBORNE or
|
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.LANDED or
|
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.ARRIVED then
|
|
||||||
return false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif status==FLIGHTGROUP.ElementStatus.PARKING then
|
elseif status==FLIGHTGROUP.ElementStatus.PARKING then
|
||||||
|
|
||||||
if element.status~=status or
|
-- Element PARKING: Check that the other are not stil SPAWNED
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.TAXIING or
|
if element.status~=status and
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.AIRBORNE or
|
element.status==FLIGHTGROUP.ElementStatus.SPAWNED then
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.LANDED or
|
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.ARRIVED then
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif status==FLIGHTGROUP.ElementStatus.TAXIING then
|
elseif status==FLIGHTGROUP.ElementStatus.TAXIING then
|
||||||
|
|
||||||
if element.status~=status or
|
-- Element TAXIING: Check that the other are not stil SPAWNED or PARKING
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.AIRBORNE or
|
if element.status~=status and
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.LANDED or
|
element.status==FLIGHTGROUP.ElementStatus.SPAWNED or
|
||||||
element.status~=FLIGHTGROUP.ElementStatus.ARRIVED then
|
element.status==FLIGHTGROUP.ElementStatus.PARKING then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
elseif status==FLIGHTGROUP.ElementStatus.AIRBORNE then
|
||||||
|
|
||||||
|
-- Element AIRBORNE: Check that the other are not stil SPAWNED, PARKING or TAXIING
|
||||||
|
if element.status~=status and
|
||||||
|
element.status==FLIGHTGROUP.ElementStatus.SPAWNED or
|
||||||
|
element.status==FLIGHTGROUP.ElementStatus.PARKING or
|
||||||
|
element.status==FLIGHTGROUP.ElementStatus.TAXIING then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
elseif status==FLIGHTGROUP.ElementStatus.LANDED then
|
elseif status==FLIGHTGROUP.ElementStatus.LANDED then
|
||||||
|
|
||||||
if element.status~=status or element.status~=FLIGHTGROUP.ElementStatus.ARRIVED then
|
-- Element LANDED: check that the others are not stil AIRBORNE
|
||||||
|
if element.status~=status and
|
||||||
|
element.status==FLIGHTGROUP.ElementStatus.AIRBORNE then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif status==FLIGHTGROUP.ElementStatus.ARRIVED then
|
elseif status==FLIGHTGROUP.ElementStatus.ARRIVED then
|
||||||
|
|
||||||
if element.status~=status then
|
-- Element ARRIVED: check that the others are not stil AIRBORNE or TAXIING
|
||||||
|
if element.status~=status and
|
||||||
|
element.status==FLIGHTGROUP.ElementStatus.AIRBORNE or
|
||||||
|
element.status==FLIGHTGROUP.ElementStatus.TAXIING then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -806,18 +897,24 @@ function FLIGHTGROUP:_UpdateStatus(element, newstatus)
|
|||||||
-- SPAWNED
|
-- SPAWNED
|
||||||
---
|
---
|
||||||
|
|
||||||
self:ElementSpawned(element)
|
--self:ElementSpawned(element)
|
||||||
|
|
||||||
if self:_AllSimilarStatus(newstatus) then
|
if self:_AllSimilarStatus(newstatus) then
|
||||||
self:FlightSpawned(group)
|
self:FlightSpawned(group)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if element.unit:InAir() then
|
||||||
|
self:ElementAirborne(element)
|
||||||
|
else
|
||||||
|
self:ElementParking(element)
|
||||||
|
end
|
||||||
|
|
||||||
elseif newstatus==FLIGHTGROUP.ElementStatus.PARKING then
|
elseif newstatus==FLIGHTGROUP.ElementStatus.PARKING then
|
||||||
---
|
---
|
||||||
-- PARKING
|
-- PARKING
|
||||||
---
|
---
|
||||||
|
|
||||||
self:ElementParking(element)
|
--self:ElementParking(element)
|
||||||
|
|
||||||
if self:_AllSimilarStatus(newstatus) then
|
if self:_AllSimilarStatus(newstatus) then
|
||||||
self:FlightParking(group)
|
self:FlightParking(group)
|
||||||
@@ -828,7 +925,7 @@ function FLIGHTGROUP:_UpdateStatus(element, newstatus)
|
|||||||
-- TAXIING
|
-- TAXIING
|
||||||
---
|
---
|
||||||
|
|
||||||
self:ElementTaxiing(element)
|
--self:ElementTaxiing(element)
|
||||||
|
|
||||||
if self:_AllSimilarStatus(newstatus) then
|
if self:_AllSimilarStatus(newstatus) then
|
||||||
self:FlightTaxiing(group)
|
self:FlightTaxiing(group)
|
||||||
@@ -839,17 +936,18 @@ function FLIGHTGROUP:_UpdateStatus(element, newstatus)
|
|||||||
-- AIRBORNE
|
-- AIRBORNE
|
||||||
---
|
---
|
||||||
|
|
||||||
self:ElementAirborne(element)
|
--self:ElementAirborne(element)
|
||||||
|
|
||||||
if self:_AllSimilarStatus(newstatus) then
|
if self:_AllSimilarStatus(newstatus) then
|
||||||
|
|
||||||
if self:IsTaxiing() then
|
if self:IsTaxiing() then
|
||||||
self:FlightAirborne(group)
|
self:FlightAirborne(group)
|
||||||
elseif self:IsParking() then
|
elseif self:IsParking() then
|
||||||
self:FlightTaxiing(group)
|
--self:FlightTaxiing(group)
|
||||||
self:FlightAirborne(group)
|
self:FlightAirborne(group)
|
||||||
elseif self:IsSpawned() then
|
elseif self:IsSpawned() then
|
||||||
self:FlightParking(group)
|
--self:FlightParking(group)
|
||||||
self:FlightTaxiing(group)
|
--self:FlightTaxiing(group)
|
||||||
self:FlightAirborne(group)
|
self:FlightAirborne(group)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -860,7 +958,7 @@ function FLIGHTGROUP:_UpdateStatus(element, newstatus)
|
|||||||
-- LANDED
|
-- LANDED
|
||||||
---
|
---
|
||||||
|
|
||||||
self:ElementLanded(element)
|
--self:ElementLanded(element)
|
||||||
|
|
||||||
if self:_AllSimilarStatus(newstatus) then
|
if self:_AllSimilarStatus(newstatus) then
|
||||||
self:FlightLanded(group)
|
self:FlightLanded(group)
|
||||||
@@ -871,7 +969,7 @@ function FLIGHTGROUP:_UpdateStatus(element, newstatus)
|
|||||||
-- ARRIVED
|
-- ARRIVED
|
||||||
---
|
---
|
||||||
|
|
||||||
self:ElementArrived(element)
|
--self:ElementArrived(element)
|
||||||
|
|
||||||
if self:_AllSimilarStatus(newstatus) then
|
if self:_AllSimilarStatus(newstatus) then
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user