Merge branch 'develop' into FF/Ops

This commit is contained in:
Frank
2022-09-01 22:31:52 +02:00
9 changed files with 237 additions and 59 deletions

View File

@@ -2385,10 +2385,10 @@ function GROUP:GetAttribute()
local infantry=self:HasAttribute("Infantry")
local artillery=self:HasAttribute("Artillery")
local tank=self:HasAttribute("Old Tanks") or self:HasAttribute("Modern Tanks")
local aaa=self:HasAttribute("AAA")
local aaa=self:HasAttribute("AAA") and (not self:HasAttribute("SAM elements"))
local ewr=self:HasAttribute("EWR")
local ifv=self:HasAttribute("IFV")
local sam=self:HasAttribute("SAM elements") and (not self:HasAttribute("AAA"))
local sam=self:HasAttribute("SAM elements") or self:HasAttribute("Optical Tracker")
-- Train
local train=self:GetCategory()==Group.Category.TRAIN
@@ -2431,12 +2431,12 @@ function GROUP:GetAttribute()
attribute=GROUP.Attribute.GROUND_ARTILLERY
elseif tank then
attribute=GROUP.Attribute.GROUND_TANK
elseif ifv then
attribute=GROUP.Attribute.GROUND_IFV
elseif apc then
attribute=GROUP.Attribute.GROUND_APC
elseif infantry then
attribute=GROUP.Attribute.GROUND_INFANTRY
elseif ifv then
attribute=GROUP.Attribute.GROUND_IFV
attribute=GROUP.Attribute.GROUND_INFANTRY
elseif truck then
attribute=GROUP.Attribute.GROUND_TRUCK
elseif train then

View File

@@ -830,7 +830,9 @@ function UNIT:HasSEAD()
local HasSEAD = false
if UnitSEADAttributes["RADAR_BAND1_FOR_ARM"] and UnitSEADAttributes["RADAR_BAND1_FOR_ARM"] == true or
UnitSEADAttributes["RADAR_BAND2_FOR_ARM"] and UnitSEADAttributes["RADAR_BAND2_FOR_ARM"] == true then
UnitSEADAttributes["RADAR_BAND2_FOR_ARM"] and UnitSEADAttributes["RADAR_BAND2_FOR_ARM"] == true or
UnitSEADAttributes["Optical Tracker"] and UnitSEADAttributes["Optical Tracker"] == true
then
HasSEAD = true
end
return HasSEAD
@@ -1067,7 +1069,7 @@ function UNIT:GetThreatLevel()
if Descriptor then
local Attributes = Descriptor.attributes
if self:IsGround() then
local ThreatLevels = {