This commit is contained in:
Applevangelist 2025-02-23 16:09:41 +01:00
parent b66a342642
commit 25845c4d22
3 changed files with 15 additions and 5 deletions

View File

@ -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!

View File

@ -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

View File

@ -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()