[ADDED] AIRBOSS:SetMaxSectionDistance

This commit is contained in:
shaji 2025-04-23 13:39:55 +02:00
parent 460d2768ff
commit dd7b87e9cd

View File

@ -1912,6 +1912,9 @@ function AIRBOSS:New( carriername, alias )
-- Set max section members. Default 2. -- Set max section members. Default 2.
self:SetMaxSectionSize() self:SetMaxSectionSize()
-- Set max section distance. Default 100 meters.
self:SetMaxSectionDistance()
-- Set max flights per stack. Default is 2. -- Set max flights per stack. Default is 2.
self:SetMaxFlightsPerStack() self:SetMaxFlightsPerStack()
@ -3343,6 +3346,22 @@ function AIRBOSS:SetMaxSectionSize( nmax )
return self return self
end end
--- Set maximum distance up to which section members are allowed (default: 100 meters).
-- @param #AIRBOSS self
-- @param #number dmax Max distance in meters (default 100 m). Minimum is 10 m, maximum is 5000 m.
-- @return #AIRBOSS self
function AIRBOSS:SetMaxSectionDistance( dmax )
if dmax then
if dmax < 10 then
dmax = 10
elseif dmax > 5000 then
dmax = 5000
end
end
self.maxsectiondistance = dmax or 100
return self
end
--- Set max number of flights per stack. All members of a section count as one "flight". --- Set max number of flights per stack. All members of a section count as one "flight".
-- @param #AIRBOSS self -- @param #AIRBOSS self
-- @param #number nmax Number of max allowed flights per stack. Default is two. Minimum is one, maximum is 4. -- @param #number nmax Number of max allowed flights per stack. Default is two. Minimum is one, maximum is 4.
@ -17047,7 +17066,7 @@ function AIRBOSS:_RemoveSectionMember( playerData, sectionmember )
return false return false
end end
--- Set all flights within 100 meters to be part of my section. --- Set all flights within maxsectiondistance meters to be part of my section (default: 100 meters).
-- @param #AIRBOSS self -- @param #AIRBOSS self
-- @param #string _unitName Name of the player unit. -- @param #string _unitName Name of the player unit.
function AIRBOSS:_SetSection( _unitName ) function AIRBOSS:_SetSection( _unitName )
@ -17065,7 +17084,7 @@ function AIRBOSS:_SetSection( _unitName )
local mycoord = _unit:GetCoordinate() local mycoord = _unit:GetCoordinate()
-- Max distance up to which section members are allowed. -- Max distance up to which section members are allowed.
local dmax = 100 local dmax = self.maxsectiondistance
-- Check if player is in Marshal or pattern queue already. -- Check if player is in Marshal or pattern queue already.
local text local text