Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Applevangelist 2025-07-18 09:24:58 +02:00
commit 00de8d911c
4 changed files with 23 additions and 11 deletions

View File

@ -4801,6 +4801,8 @@ end
-- @return #boolean If `true`, all groups are done with the mission.
function AUFTRAG:CheckGroupsDone()
local fsmState = self:GetState()
-- Check status of all OPS groups.
for groupname,data in pairs(self.groupdata) do
local groupdata=data --#AUFTRAG.GroupData
@ -4859,12 +4861,12 @@ function AUFTRAG:CheckGroupsDone()
return true
end
if (self:IsStarted() or self:IsExecuting()) and self:CountOpsGroups()>0 then
if (self:IsStarted() or self:IsExecuting()) and (fsmState == AUFTRAG.Status.STARTED or fsmState == AUFTRAG.Status.EXECUTING) and self:CountOpsGroups()>0 then
self:T(self.lid..string.format("CheckGroupsDone: Mission is STARTED state %s [FSM=%s] and count of alive OPSGROUP > zero. Mission NOT DONE!", self.status, self:GetState()))
return false
end
return false
return true
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -1670,9 +1670,12 @@ function COMMANDER:_GetCohorts(Legions, Cohorts, Operation)
for _,_legion in pairs(Legions or {}) do
local legion=_legion --Ops.Legion#LEGION
-- Check that runway is operational.
local Runway=legion:IsAirwing() and legion:IsRunwayOperational() or true
-- Check that runway is operational.
local Runway=true
if legion:IsAirwing() then
Runway=legion:IsRunwayOperational() and legion.airbase and legion.airbase:GetCoalition() == legion:GetCoalition()
end
-- Legion has to be running.
if legion:IsRunning() and Runway then
@ -1703,9 +1706,12 @@ function COMMANDER:_GetCohorts(Legions, Cohorts, Operation)
for _,_legion in pairs(self.legions) do
local legion=_legion --Ops.Legion#LEGION
-- Check that runway is operational.
local Runway=legion:IsAirwing() and legion:IsRunwayOperational() or true
-- Check that runway is operational.
local Runway=true
if legion:IsAirwing() then
Runway=legion:IsRunwayOperational() and legion.airbase and legion.airbase:GetCoalition() == legion:GetCoalition()
end
-- Legion has to be running.
if legion:IsRunning() and Runway then

View File

@ -2513,9 +2513,12 @@ function LEGION._GetCohorts(Legions, Cohorts, Operation, OpsQueue)
for _,_legion in pairs(Legions or {}) do
local legion=_legion --Ops.Legion#LEGION
-- Check that runway is operational.
local Runway=legion:IsAirwing() and legion:IsRunwayOperational() or true
-- Check that runway is operational.
local Runway=true
if legion:IsAirwing() then
Runway=legion:IsRunwayOperational() and legion.airbase and legion.airbase:GetCoalition() == legion:GetCoalition()
end
-- Legion has to be running.
if legion:IsRunning() and Runway then

View File

@ -230,6 +230,7 @@ GROUP.Attribute = {
GROUND_EWR="Ground_EWR",
GROUND_AAA="Ground_AAA",
GROUND_SAM="Ground_SAM",
GROUND_SHORAD="Ground_SHORAD",
GROUND_OTHER="Ground_OtherGround",
NAVAL_AIRCRAFTCARRIER="Naval_AircraftCarrier",
NAVAL_WARSHIP="Naval_WarShip",