From 7e9dd9deff401d5badd0a1cc9fc605951dd107f5 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Tue, 23 Jun 2026 12:29:45 +0200 Subject: [PATCH 1/3] #EASYGCICAP - fall back to GCI behaviour if no CAP Points have been defined. --- Moose Development/Moose/Ops/EasyGCICAP.lua | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Ops/EasyGCICAP.lua b/Moose Development/Moose/Ops/EasyGCICAP.lua index 1b2afb44b..8166e5d8e 100644 --- a/Moose Development/Moose/Ops/EasyGCICAP.lua +++ b/Moose Development/Moose/Ops/EasyGCICAP.lua @@ -135,6 +135,7 @@ -- local mywing = EASYGCICAP:New("Blue CAP Operations",AIRBASE.Caucasus.Kutaisi,"blue","Blue EWR") -- -- -- Add a CAP patrol point belonging to our airbase, we'll be at 30k ft doing 400 kn, initial direction 90 degrees (East), leg 20NM +-- -- NOTE - Skip this function and do not create CAP Points if you want GCI behaviour only. -- mywing:AddPatrolPointCAP(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone 1"):GetCoordinate(),30000,400,90,20) -- -- -- Add a Squadron with template "Blue Sq1 M2000c", 20 airframes, skill good, Modex starting with 102 and skin "Vendee Jeanne" @@ -286,7 +287,7 @@ EASYGCICAP = { --- EASYGCICAP class version. -- @field #string version -EASYGCICAP.version="0.1.36" +EASYGCICAP.version="0.1.37" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- @@ -754,6 +755,15 @@ end function EASYGCICAP:_AddAirwing(Airbasename, Alias) self:T(self.lid.."_AddAirwing "..Airbasename) + -- Gather Some Stats + local function counttable(tbl) + local count = 0 + for _,_data in pairs(tbl) do + count = count + 1 + end + return count + end + local CapFormation = self.CapFormation local DespawnAfterLanding = self.DespawnAfterLanding local DespawnAfterHolding = self.DespawnAfterHolding @@ -772,7 +782,11 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias) CAP_Wing:SetMarker(false) CAP_Wing:SetAirbase(AIRBASE:FindByName(Airbasename)) CAP_Wing:SetRespawnAfterDestroyed() - CAP_Wing:SetNumberCAP(self.capgrouping) + + --- #DONE avoid wings with no CAP points starting CAP anyhow; AirWing uses this to start CAP and creates points when there are none. + if counttable(self.ManagedCP) >0 then + CAP_Wing:SetNumberCAP(self.capgrouping) + end CAP_Wing:SetCapCloseRaceTrack(true) if self.showpatrolpointmarks then @@ -1039,7 +1053,7 @@ function EASYGCICAP:_SetCAPPatrolPoints() MESSAGE:New(self.lid.."You are trying to create a CAP point for which there is no wing! "..tostring(data.AirbaseName),30,"CHECK"):ToAllIf(self.debug):ToLog() return end - local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING + local Wing = self.wings[data.AirbaseName][1] -- Ops.AirWing#AIRWING local Coordinate = data.Coordinate local Altitude = data.Altitude local Speed = data.Speed From f769a0deb55e4b9bce3dc0fd4b4bbd248d8d5663 Mon Sep 17 00:00:00 2001 From: leka1986 <83298840+leka1986@users.noreply.github.com> Date: Wed, 24 Jun 2026 01:56:31 +0200 Subject: [PATCH 2/3] Update Utils.lua Added KA-50_3 door check. --- Moose Development/Moose/Utilities/Utils.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Moose Development/Moose/Utilities/Utils.lua b/Moose Development/Moose/Utilities/Utils.lua index b75fe8935..d4e933658 100644 --- a/Moose Development/Moose/Utilities/Utils.lua +++ b/Moose Development/Moose/Utilities/Utils.lua @@ -2378,6 +2378,11 @@ function UTILS.IsLoadingDoorOpen( unit_name ) BASE:T(unit_name .. " front door(s) are open or doors removed") return true end + + if type_name == "Ka-50_3" and unit:getDrawArgumentValue(38) == 1 then + BASE:T(unit_name .. " cockpit door is open") + return true + end if type_name=="C-130J-30" and (unit:getDrawArgumentValue(86)==1)then BASE:T(unit_name.." rear doors are open") From 8c60a8c678954592cb4f780acdfeec6e031e33a2 Mon Sep 17 00:00:00 2001 From: Thomas <72444570+Applevangelist@users.noreply.github.com> Date: Fri, 26 Jun 2026 12:31:54 +0200 Subject: [PATCH 3/3] Update ScheduleDispatcher.lua Undoing previous change as some delayed event calls stopped working, probably FSM. Need to find the reason for that. --- Moose Development/Moose/Core/ScheduleDispatcher.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Core/ScheduleDispatcher.lua b/Moose Development/Moose/Core/ScheduleDispatcher.lua index 0d6fa6df5..05fe6d25f 100644 --- a/Moose Development/Moose/Core/ScheduleDispatcher.lua +++ b/Moose Development/Moose/Core/ScheduleDispatcher.lua @@ -246,11 +246,11 @@ function SCHEDULEDISPATCHER:AddSchedule( Scheduler, ScheduleFunction, ScheduleAr -- self:T3( { Repeat = CallID, CurrentTime, ScheduleTime, ScheduleArguments } ) return ScheduleTime -- returns the next time the function needs to be called. else - self:_Reclaim( Scheduler, CallID ) + self:Stop( Scheduler, CallID ) end else - self:_Reclaim( Scheduler, CallID ) + self:Stop( Scheduler, CallID ) end else self:I( "<<<>" .. Name .. ":" .. Line .. " (" .. Source .. ")" )