mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
[ADDED] AIRBOSS:SetMaxSectionDistance
This commit is contained in:
parent
460d2768ff
commit
dd7b87e9cd
@ -1912,6 +1912,9 @@ function AIRBOSS:New( carriername, alias )
|
||||
-- Set max section members. Default 2.
|
||||
self:SetMaxSectionSize()
|
||||
|
||||
-- Set max section distance. Default 100 meters.
|
||||
self:SetMaxSectionDistance()
|
||||
|
||||
-- Set max flights per stack. Default is 2.
|
||||
self:SetMaxFlightsPerStack()
|
||||
|
||||
@ -3343,6 +3346,22 @@ function AIRBOSS:SetMaxSectionSize( nmax )
|
||||
return self
|
||||
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".
|
||||
-- @param #AIRBOSS self
|
||||
-- @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
|
||||
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 #string _unitName Name of the player unit.
|
||||
function AIRBOSS:_SetSection( _unitName )
|
||||
@ -17065,7 +17084,7 @@ function AIRBOSS:_SetSection( _unitName )
|
||||
local mycoord = _unit:GetCoordinate()
|
||||
|
||||
-- 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.
|
||||
local text
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user