Update Chief.lua

This commit is contained in:
Applevangelist 2021-11-20 17:26:42 +01:00 committed by GitHub
parent c610c4cba9
commit b41b8f251f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1770,6 +1770,7 @@ function CHIEF:CheckOpsZoneQueue()
-- Has a CAS mission?
--local hasMissionCAS=stratzone.missionCAS and stratzone.missionCAS:IsNotOver() or false
local hasMissionCAS, CASMissions = stratzone.opszone:_FindMissions(self.coalition,AUFTRAG.Type.CAS)
local hasMissionARTY, ARTYMissions = stratzone.opszone:_FindMissions(self.coalition,AUFTRAG.Type.ARTY)
if ownercoalition==self.coalition and stratzone.opszone:IsEmpty() and hasMissionCAS then
-- Cancel CAS mission if zone is ours and no enemies are present.
@ -1780,6 +1781,14 @@ function CHIEF:CheckOpsZoneQueue()
end
end
if ownercoalition==self.coalition and hasMissionARTY then
-- Cancel CAS mission if zone is ours and no enemies are present.
-- TODO: Might want to check if we still have ARTY capable assets in stock?!
--stratzone.missionCAS:Cancel()
for _,_auftrag in pairs(ARTYMissions) do
_auftrag:Cancel()
end
end
end