- Airwing added :SetPayloadAmount() and SetAirboss() functions
- AUFTRAG fixed Failure to Failed event name
- CHIEF added statics as targets
- LEGION added check that runway is operational and carrier is not recovering for mission selection
This commit is contained in:
Frank
2021-12-21 11:54:55 +01:00
parent 854a1e5723
commit 40c0f69eff
5 changed files with 88 additions and 21 deletions

View File

@@ -45,7 +45,7 @@ LEGION = {
--- LEGION class version.
-- @field #string version
LEGION.version="0.1.0"
LEGION.version="0.2.0"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
@@ -467,6 +467,19 @@ function LEGION:CheckMissionQueue()
mission:Cancel()
end
end
-- Check that runway is operational and that carrier is not recovering.
if self:IsAirwing() then
if self:IsRunwayOperational() then
return nil
end
local airboss=self.airboss --Ops.Airboss#AIRBOSS
if airboss then
if not airboss:IsIdle() then
return nil
end
end
end
-- Sort results table wrt prio and start time.
local function _sort(a, b)
@@ -2384,11 +2397,11 @@ function LEGION.CalculateAssetMissionScore(asset, MissionType, TargetVec2, Inclu
score=score-distance
-- Intercepts need to be carried out quickly. We prefer spawned assets.
if MissionType==AUFTRAG.Type.INTERCEPT then
--if MissionType==AUFTRAG.Type.INTERCEPT then
if asset.spawned then
score=score+25
end
end
--end
-- TRANSPORT specific.
if MissionType==AUFTRAG.Type.OPSTRANSPORT then