* ensure tactical frequencies are handed back

#PlayerTask
* Add'l check for stale tasks to rebuild menu
This commit is contained in:
Applevangelist
2023-07-29 16:44:25 +02:00
parent cbd371b40f
commit 4ed2b0610d
2 changed files with 42 additions and 5 deletions

View File

@@ -1517,6 +1517,23 @@ function AWACS:_SubScribeTactRadio(Group,Frequency)
return self
end
--- [Internal] _CheckSubscribers
-- @param #AWACS self
-- @return #AWACS self
function AWACS:_CheckSubscribers()
self:T(self.lid.."_InitLocalization")
for _name,_freq in pairs(self.TacticalSubscribers or {}) do
local grp = GROUP:FindByName(_name)
if (not grp) or (not grp:IsAlive()) then
self.TacticalFrequencies[_freq] = _freq
self.TacticalSubscribers[_name] = nil
end
end
return self
end
--- [Internal] Init localization
-- @param #AWACS self
-- @return #AWACS self
@@ -6180,6 +6197,8 @@ function AWACS:onafterStatus(From, Event, To)
self:_CheckMerges()
self:_CheckSubscribers()
local outcome, targets = self:_TargetSelectionProcess(true)
self:_CheckTaskQueue()