mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
OPS
This commit is contained in:
@@ -2396,7 +2396,7 @@ function FLIGHTGROUP:_LandAtAirbase(airbase, SpeedTo, SpeedHold, SpeedLand)
|
|||||||
-- Set holding flag to 0=false.
|
-- Set holding flag to 0=false.
|
||||||
self.flaghold:Set(0)
|
self.flaghold:Set(0)
|
||||||
|
|
||||||
local holdtime=5*60
|
local holdtime=1*60
|
||||||
if fc or self.airboss then
|
if fc or self.airboss then
|
||||||
holdtime=nil
|
holdtime=nil
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1713,24 +1713,28 @@ end
|
|||||||
-- @param #OPSGROUP self
|
-- @param #OPSGROUP self
|
||||||
-- @return #boolean If true, group is not spawned yet.
|
-- @return #boolean If true, group is not spawned yet.
|
||||||
function OPSGROUP:IsInUtero()
|
function OPSGROUP:IsInUtero()
|
||||||
return self:Is("InUtero")
|
local is=self:Is("InUtero")
|
||||||
|
return is
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Check if group is in state spawned.
|
--- Check if group is in state spawned.
|
||||||
-- @param #OPSGROUP self
|
-- @param #OPSGROUP self
|
||||||
-- @return #boolean If true, group is spawned.
|
-- @return #boolean If true, group is spawned.
|
||||||
function OPSGROUP:IsSpawned()
|
function OPSGROUP:IsSpawned()
|
||||||
return self:Is("Spawned")
|
local is=self:Is("Spawned")
|
||||||
|
return is
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Check if group is dead.
|
--- Check if group is dead.
|
||||||
-- @param #OPSGROUP self
|
-- @param #OPSGROUP self
|
||||||
-- @return #boolean If true, all units/elements of the group are dead.
|
-- @return #boolean If true, all units/elements of the group are dead.
|
||||||
function OPSGROUP:IsDead()
|
function OPSGROUP:IsDead()
|
||||||
|
--env.info("FF IsDead")
|
||||||
if self.isDead then
|
if self.isDead then
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
return self:Is("Dead")
|
local is=self:Is("Dead")
|
||||||
|
return is
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1745,7 +1749,8 @@ end
|
|||||||
-- @param #OPSGROUP self
|
-- @param #OPSGROUP self
|
||||||
-- @return #boolean If true, FSM state is stopped.
|
-- @return #boolean If true, FSM state is stopped.
|
||||||
function OPSGROUP:IsStopped()
|
function OPSGROUP:IsStopped()
|
||||||
return self:Is("Stopped")
|
local is=self:Is("Stopped")
|
||||||
|
return is
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Check if this group is currently "uncontrolled" and needs to be "started" to begin its route.
|
--- Check if this group is currently "uncontrolled" and needs to be "started" to begin its route.
|
||||||
@@ -1781,14 +1786,16 @@ end
|
|||||||
-- @param #OPSGROUP self
|
-- @param #OPSGROUP self
|
||||||
-- @return #boolean If true, group is retreating.
|
-- @return #boolean If true, group is retreating.
|
||||||
function OPSGROUP:IsRetreating()
|
function OPSGROUP:IsRetreating()
|
||||||
return self:is("Retreating")
|
local is=self:is("Retreating")
|
||||||
|
return is
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Check if the group is engaging another unit or group.
|
--- Check if the group is engaging another unit or group.
|
||||||
-- @param #OPSGROUP self
|
-- @param #OPSGROUP self
|
||||||
-- @return #boolean If true, group is engaging.
|
-- @return #boolean If true, group is engaging.
|
||||||
function OPSGROUP:IsEngaging()
|
function OPSGROUP:IsEngaging()
|
||||||
return self:is("Engaging")
|
local is=self:is("Engaging")
|
||||||
|
return is
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Check if the group is not a carrier yet.
|
--- Check if the group is not a carrier yet.
|
||||||
@@ -2358,7 +2365,7 @@ function OPSGROUP:OnEventBirth(EventData)
|
|||||||
self.destbase=self.homebase
|
self.destbase=self.homebase
|
||||||
end
|
end
|
||||||
|
|
||||||
self:I(self.lid..string.format("EVENT: Element %s born at airbase %s ==> spawned", unitname, self.homebase and self.homebase:GetName() or "unknown"))
|
self:I(self.lid..string.format("EVENT: Element %s born at airbase %s ==> spawned", unitname, self.currbase and self.currbase:GetName() or "unknown"))
|
||||||
else
|
else
|
||||||
self:T3(self.lid..string.format("EVENT: Element %s born ==> spawned", unitname))
|
self:T3(self.lid..string.format("EVENT: Element %s born ==> spawned", unitname))
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user