From 25845c4d220a3f9f594f7e269801691ddca3558f Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sun, 23 Feb 2025 16:09:41 +0100 Subject: [PATCH] xxx --- Moose Development/Moose/Core/Set.lua | 10 ++++++++++ Moose Development/Moose/Ops/EasyGCICAP.lua | 8 ++++---- Moose Development/Moose/Wrapper/Controllable.lua | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Core/Set.lua b/Moose Development/Moose/Core/Set.lua index 56ec9ecab..f2b6e6d3c 100644 --- a/Moose Development/Moose/Core/Set.lua +++ b/Moose Development/Moose/Core/Set.lua @@ -4611,6 +4611,16 @@ do -- SET_CLIENT end return self end + + --- Make the SET handle CA slots **only** (GROUND units used by any player). Needs active filtering with `FilterStart()` + -- @param #SET_CLIENT self + -- @return #SET_CLIENT self + function SET_CLIENT:HandleCASlots() + self:HandleEvent(EVENTS.PlayerEnterUnit,SET_CLIENT._EventPlayerEnterUnit) + self:HandleEvent(EVENTS.PlayerLeaveUnit,SET_CLIENT._EventPlayerLeaveUnit) + self:FilterFunction(function(client) if client and client:IsAlive() and client:IsGround() then return true else return false end end) + return self + end --- Handles the Database to check on an event (birth) that the Object was added in the Database. -- This is required, because sometimes the _DATABASE birth event gets called later than the SET_BASE birth event! diff --git a/Moose Development/Moose/Ops/EasyGCICAP.lua b/Moose Development/Moose/Ops/EasyGCICAP.lua index 93f6fcf3b..c5f0ebb0b 100644 --- a/Moose Development/Moose/Ops/EasyGCICAP.lua +++ b/Moose Development/Moose/Ops/EasyGCICAP.lua @@ -252,7 +252,7 @@ EASYGCICAP = { --- EASYGCICAP class version. -- @field #string version -EASYGCICAP.version="0.1.16" +EASYGCICAP.version="0.1.17" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- TODO list @@ -599,7 +599,7 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias) local TankerInvisible = self.TankerInvisible - function CAP_Wing:OnAfterFlightOnMission(From, Event, To, Flightgroup, Mission) + function CAP_Wing:onbeforeFlightOnMission(From, Event, To, Flightgroup, Mission) local flightgroup = Flightgroup -- Ops.FlightGroup#FLIGHTGROUP if DespawnAfterLanding then flightgroup:SetDespawnAfterLanding() @@ -629,7 +629,7 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias) flightgroup:SetFuelLowRTB(true) Intel:AddAgent(flightgroup) if DespawnAfterHolding then - function flightgroup:OnAfterHolding(From,Event,To) + function flightgroup:onbeforeHolding(From,Event,To) self:Despawn(1,true) end end @@ -1327,7 +1327,7 @@ function EASYGCICAP:_StartIntel() self:_AssignIntercept(Cluster) end - function BlueIntel:OnAfterNewCluster(From,Event,To,Cluster) + function BlueIntel:onbeforeNewCluster(From,Event,To,Cluster) AssignCluster(Cluster) end diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index fbe6a31e2..12f114734 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -4310,7 +4310,7 @@ function CONTROLLABLE:OptionDisperseOnAttack( Seconds ) end --- Returns if the unit is a submarine. --- @param #POSITIONABLE self +-- @param #CONTROLLABLE self -- @return #boolean Submarines attributes result. function CONTROLLABLE:IsSubmarine() self:F2()