#SET_CLIENT - added option to handle CA slots

#CONTROLLABLE - fix typos
This commit is contained in:
Applevangelist 2025-02-23 16:10:07 +01:00
parent 2b0b9d44eb
commit 1c0a8d9380
2 changed files with 12 additions and 2 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

@ -973,7 +973,7 @@ end
-- @param #number Frequency Radio frequency in MHz.
-- @param #number Modulation Radio modulation. Default `radio.modulation.AM`.
-- @param #number Power (Optional) Power of the Radio in Watts. Defaults to 10.
-- @param #UnitID UnitID (Optional, if your object is a UNIT) The UNIT ID this is for.
-- @param #number UnitID (Optional, if your object is a UNIT) The UNIT ID this is for.
-- @param #number Delay (Optional) Delay in seconds before the frequency is set. Default is immediately.
-- @return #CONTROLLABLE self
function CONTROLLABLE:CommandSetFrequencyForUnit(Frequency,Modulation,Power,UnitID,Delay)
@ -4315,7 +4315,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()