From e87dc525b91cedd5ae94d0ddc6b14f9c4cc1f5d8 Mon Sep 17 00:00:00 2001 From: Shafik Date: Sun, 2 Feb 2025 13:25:53 +0200 Subject: [PATCH] [FIXED] Group not turning off due to conflicting condition checking true and false (`if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then`) [FIXED] Units turning on for same coalition aircrafts in radius --- Moose Development/Moose/Functional/Tiresias.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Functional/Tiresias.lua b/Moose Development/Moose/Functional/Tiresias.lua index 83cc02bba..c210a22dc 100644 --- a/Moose Development/Moose/Functional/Tiresias.lua +++ b/Moose Development/Moose/Functional/Tiresias.lua @@ -288,7 +288,7 @@ function TIRESIAS:_InitGroups() } end if grp.Tiresias and (not grp.Tiresias.exception == true) then - if grp.Tiresias.invisible and grp.Tiresias.invisible == false then + if grp.Tiresias.invisible == false then grp:SetCommandInvisible(true) grp.Tiresias.invisible = true if SwitchAAA then @@ -315,7 +315,7 @@ function TIRESIAS:_InitGroups() } end if grp.Tiresias and (not grp.Tiresias.exception == true) then - if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then + if grp.Tiresias and grp.Tiresias.invisible == false then grp:SetCommandInvisible(true) grp:SetAIOff() grp.Tiresias.invisible = true @@ -336,7 +336,7 @@ function TIRESIAS:_InitGroups() } end if grp.Tiresias and (not grp.Tiresias.exception == true) then - if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then + if grp.Tiresias and grp.Tiresias.invisible == false then grp:SetCommandInvisible(true) grp.Tiresias.invisible = true end @@ -392,7 +392,8 @@ function TIRESIAS:_SwitchOnGroups(group,radius) ground:ForEachGroupAlive( function(grp) local name = grp:GetName() - if grp.Tiresias and grp.Tiresias.type and (not grp.Tiresias.exception == true ) then + if grp:GetCoalition() ~= group:GetCoalition() + and grp.Tiresias and grp.Tiresias.type and (not grp.Tiresias.exception == true ) then if grp.Tiresias.invisible == true then grp:SetCommandInvisible(false) grp.Tiresias.invisible = false