From 008617a35c135a68b7c7160e1013b05541421e19 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Wed, 1 Jan 2025 09:14:07 +0100 Subject: [PATCH] #MANTIS - Fix for Checkloop if no Sharad instance is alive --- Moose Development/Moose/Functional/Mantis.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Functional/Mantis.lua b/Moose Development/Moose/Functional/Mantis.lua index 0ff870080..34c5c5ee3 100644 --- a/Moose Development/Moose/Functional/Mantis.lua +++ b/Moose Development/Moose/Functional/Mantis.lua @@ -22,7 +22,7 @@ -- @module Functional.Mantis -- @image Functional.Mantis.jpg -- --- Last Update: Dec 2024 +-- Last Update: Jan 2025 ------------------------------------------------------------------------- --- **MANTIS** class, extends Core.Base#BASE @@ -663,7 +663,7 @@ do -- TODO Version -- @field #string version - self.version="0.8.21" + self.version="0.8.22" self:I(string.format("***** Starting MANTIS Version %s *****", self.version)) --- FSM Functions --- @@ -1690,7 +1690,10 @@ do local samgroup = GROUP:FindByName(name) local IsInZone, Distance = self:_CheckObjectInZone(detset, samcoordinate, radius, height, dlink) local suppressed = self.SuppressedGroups[name] or false - local activeshorad = self.Shorad.ActiveGroups[name] or false + local activeshorad = false + if self.Shorad and self.Shorad.ActiveGroups and self.Shorad.ActiveGroups[name] then + activeshorad = true + end if IsInZone and not suppressed and not activeshorad then --check any target in zone and not currently managed by SEAD if samgroup:IsAlive() then -- switch on SAM