Merge remote-tracking branch 'origin/master' into branch

This commit is contained in:
Applevangelist 2025-04-24 14:49:33 +02:00
commit f283e68a63
4 changed files with 108 additions and 74 deletions

View File

@ -206,7 +206,7 @@ end
function MESSAGE:ToGroup( Group, Settings ) function MESSAGE:ToGroup( Group, Settings )
self:F( Group.GroupName ) self:F( Group.GroupName )
if Group then if Group and Group:IsAlive() then
if self.MessageType then if self.MessageType then
local Settings = Settings or (Group and _DATABASE:GetPlayerSettings( Group:GetPlayerName() )) or _SETTINGS -- Core.Settings#SETTINGS local Settings = Settings or (Group and _DATABASE:GetPlayerSettings( Group:GetPlayerName() )) or _SETTINGS -- Core.Settings#SETTINGS
@ -231,7 +231,7 @@ end
function MESSAGE:ToUnit( Unit, Settings ) function MESSAGE:ToUnit( Unit, Settings )
self:F( Unit.IdentifiableName ) self:F( Unit.IdentifiableName )
if Unit then if Unit and Unit:IsAlive() then
if self.MessageType then if self.MessageType then
local Settings = Settings or ( Unit and _DATABASE:GetPlayerSettings( Unit:GetPlayerName() ) ) or _SETTINGS -- Core.Settings#SETTINGS local Settings = Settings or ( Unit and _DATABASE:GetPlayerSettings( Unit:GetPlayerName() ) ) or _SETTINGS -- Core.Settings#SETTINGS

View File

@ -2102,7 +2102,12 @@ function RANGE._OnImpact(weapon, self, playerData, attackHdg, attackAlt, attackV
result.attackHdg = attackHdg result.attackHdg = attackHdg
result.attackVel = attackVel result.attackVel = attackVel
result.attackAlt = attackAlt result.attackAlt = attackAlt
result.date=os and os.date() or "n/a" if os and os.date then
result.date=os.date()
else
self:E(self.lid.."os or os.date() not available")
result.date = "n/a"
end
-- Add to table. -- Add to table.
table.insert( _results, result ) table.insert( _results, result )

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()
@ -3344,6 +3347,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.
@ -17049,7 +17068,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 )
@ -17067,7 +17086,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

View File

@ -793,6 +793,11 @@ AIRBASE.Sinai = {
-- * AIRBASE.Kola.Alakourtti -- * AIRBASE.Kola.Alakourtti
-- * AIRBASE.Kola.Kittila -- * AIRBASE.Kola.Kittila
-- * AIRBASE.Kola.Bardufoss -- * AIRBASE.Kola.Bardufoss
-- * AIRBASE.Kola.Alta
-- * AIRBASE.Kola.Sodankyla
-- * AIRBASE.Kola.Enontekio
-- * AIRBASE.Kola.Evenes
-- * AIRBASE.Kola.Hosio
-- --
-- @field Kola -- @field Kola
AIRBASE.Kola = { AIRBASE.Kola = {
@ -818,6 +823,11 @@ AIRBASE.Kola = {
["Alakourtti"] = "Alakourtti", ["Alakourtti"] = "Alakourtti",
["Kittila"] = "Kittila", ["Kittila"] = "Kittila",
["Bardufoss"] = "Bardufoss", ["Bardufoss"] = "Bardufoss",
["Alta"] = "Alta",
["Sodankyla"] = "Sodankyla",
["Enontekio"] = "Enontekio",
["Evenes"] = "Evenes",
["Hosio"] = "Hosio",
} }
--- Airbases of the Afghanistan map --- Airbases of the Afghanistan map