Merge pull request #1672 from FlightControl-Master/FF/Ops

AIRWING
This commit is contained in:
Frank 2021-12-23 19:55:27 +01:00 committed by GitHub
commit 77f2cf5089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 1 deletions

View File

@ -470,7 +470,7 @@ function LEGION:CheckMissionQueue()
-- Check that runway is operational and that carrier is not recovering.
if self:IsAirwing() then
if self:IsRunwayOperational() then
if self:IsRunwayOperational()==false then
return nil
end
local airboss=self.airboss --Ops.Airboss#AIRBOSS

View File

@ -78,6 +78,7 @@ NAVYGROUP = {
-- @field #number Heading Heading the boat will take in degrees.
-- @field #boolean Open Currently active.
-- @field #boolean Over This turn is over.
-- @field #boolean Recovery If `true` this is a recovery window. If `false`, this is a launch window. If `nil` this is just a turn into the wind.
--- Engage Target.
-- @type NAVYGROUP.Target
@ -672,6 +673,36 @@ function NAVYGROUP:IsSteamingIntoWind()
end
end
--- Check if the group is currently recovering aircraft.
-- @param #NAVYGROUP self
-- @return #boolean If true, group is currently recovering.
function NAVYGROUP:IsRecovering()
if self.intowind then
if self.intowind.Recovery==true then
return true
else
return false
end
else
return false
end
end
--- Check if the group is currently launching aircraft.
-- @param #NAVYGROUP self
-- @return #boolean If true, group is currently launching.
function NAVYGROUP:IsLaunching()
if self.intowind then
if self.intowind.Recovery==false then
return true
else
return false
end
else
return false
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Status