From ea776aeacc7e45c9d1b0b532673bee6854e45c4c Mon Sep 17 00:00:00 2001 From: Shafik Date: Wed, 29 Jan 2025 10:05:55 +0200 Subject: [PATCH 1/5] [FIXED] attempt to get length of local 'parking' (a nil value) --- Moose Development/Moose/Functional/Warehouse.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Functional/Warehouse.lua b/Moose Development/Moose/Functional/Warehouse.lua index 3c812686d..29682074f 100644 --- a/Moose Development/Moose/Functional/Warehouse.lua +++ b/Moose Development/Moose/Functional/Warehouse.lua @@ -6047,7 +6047,7 @@ function WAREHOUSE:_SpawnAssetAircraft(alias, asset, request, parking, uncontrol else - if #parking<#template.units and not airstart then + if parking and #parking<#template.units and not airstart then local text=string.format("ERROR: Not enough parking! Free parking = %d < %d aircraft to be spawned.", #parking, #template.units) self:_DebugMessage(text) return nil From 44ad362dbc64fc326e3df6f2c2a9e500ff5ce327 Mon Sep 17 00:00:00 2001 From: Shafik Date: Wed, 29 Jan 2025 10:06:19 +0200 Subject: [PATCH 2/5] [FIXED] attempt to index local 'CleanUpUnit' (a nil value) --- Moose Development/Moose/Functional/CleanUp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Functional/CleanUp.lua b/Moose Development/Moose/Functional/CleanUp.lua index f4a391eef..82990f839 100644 --- a/Moose Development/Moose/Functional/CleanUp.lua +++ b/Moose Development/Moose/Functional/CleanUp.lua @@ -387,7 +387,7 @@ function CLEANUP_AIRBASE.__:CleanUpSchedule() local CleanUpUnit = CleanUpListData.CleanUpUnit -- Wrapper.Unit#UNIT local CleanUpGroupName = CleanUpListData.CleanUpGroupName - if CleanUpUnit:IsAlive() ~= nil then + if CleanUpUnit and CleanUpUnit:IsAlive() ~= nil then if self:IsInAirbase( CleanUpUnit:GetVec2() ) then From 161bdc0413407b5e221e1a4e4865ba649539f316 Mon Sep 17 00:00:00 2001 From: Shafik Date: Wed, 29 Jan 2025 10:13:34 +0200 Subject: [PATCH 3/5] [FIXED] attempt to concatenate field 'IniGroupName' (a nil value) ?? --- Moose Development/Moose/Ops/Awacs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Ops/Awacs.lua b/Moose Development/Moose/Ops/Awacs.lua index b777054fe..0533e13b0 100644 --- a/Moose Development/Moose/Ops/Awacs.lua +++ b/Moose Development/Moose/Ops/Awacs.lua @@ -1773,7 +1773,7 @@ function AWACS:_EventHandler(EventData) end end - if Event.id == EVENTS.PlayerLeaveUnit then --player left unit + if Event.id == EVENTS.PlayerLeaveUnit and Event.IniGroupName then --player left unit -- check known player? self:T("Player group left unit: " .. Event.IniGroupName) self:T("Player name left: " .. Event.IniPlayerName) From e87dc525b91cedd5ae94d0ddc6b14f9c4cc1f5d8 Mon Sep 17 00:00:00 2001 From: Shafik Date: Sun, 2 Feb 2025 13:25:53 +0200 Subject: [PATCH 4/5] [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 From 2744befbab59bc4b2ba77cf301b9a0c17d4d50ff Mon Sep 17 00:00:00 2001 From: Shafik Date: Sun, 2 Feb 2025 13:27:03 +0200 Subject: [PATCH 5/5] [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 | 1 + 1 file changed, 1 insertion(+) diff --git a/Moose Development/Moose/Functional/Tiresias.lua b/Moose Development/Moose/Functional/Tiresias.lua index c210a22dc..74c2b930e 100644 --- a/Moose Development/Moose/Functional/Tiresias.lua +++ b/Moose Development/Moose/Functional/Tiresias.lua @@ -319,6 +319,7 @@ function TIRESIAS:_InitGroups() grp:SetCommandInvisible(true) grp:SetAIOff() grp.Tiresias.invisible = true + grp.Tiresias.AIOff = true end end --BASE:I(string.format("Init/Switch off Vehicle %s (Exception %s)",grp:GetName(),tostring(grp.Tiresias.exception)))