mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Ensuring that only alive groups are handled, trying to solve the menu issues.
Optimizing the threatlevel boxes.
This commit is contained in:
@@ -424,7 +424,7 @@ do -- DESIGNATE
|
||||
|
||||
self.FlashStatusMenu = {}
|
||||
|
||||
self.AttackSet:ForEachGroup(
|
||||
self.AttackSet:ForEachGroupAlive(
|
||||
|
||||
--- @param Wrapper.Group#GROUP GroupReport
|
||||
function( AttackGroup )
|
||||
@@ -688,7 +688,7 @@ do -- DESIGNATE
|
||||
self:F("Removing")
|
||||
-- This Detection is obsolete, remove from the designate scope
|
||||
self.Designating[DesignateIndex] = nil
|
||||
self.AttackSet:ForEachGroup(
|
||||
self.AttackSet:ForEachGroupAlive(
|
||||
--- @param Wrapper.Group#GROUP AttackGroup
|
||||
function( AttackGroup )
|
||||
if AttackGroup:IsAlive() == true then
|
||||
@@ -714,7 +714,7 @@ do -- DESIGNATE
|
||||
if DetectedItem.DistanceRecce <= self.MaximumDistanceDesignations then
|
||||
if self.Designating[DesignateIndex] == nil then
|
||||
-- ok, we added one item to the designate scope.
|
||||
self.AttackSet:ForEachGroup(
|
||||
self.AttackSet:ForEachGroupAlive(
|
||||
function( AttackGroup )
|
||||
local DetectionText = self.Detection:DetectedItemReportSummary( DesignateIndex, AttackGroup ):Text( ", " )
|
||||
self.CC:GetPositionable():MessageToGroup( "Targets detected at \n" .. DetectionText, 10, AttackGroup, self.DesignateName )
|
||||
@@ -760,7 +760,7 @@ do -- DESIGNATE
|
||||
|
||||
Duration = Duration or 10
|
||||
|
||||
self.AttackSet:ForEachGroup(
|
||||
self.AttackSet:ForEachGroupAlive(
|
||||
|
||||
--- @param Wrapper.Group#GROUP GroupReport
|
||||
function( AttackGroup )
|
||||
@@ -785,7 +785,7 @@ do -- DESIGNATE
|
||||
|
||||
local DesignationReport = REPORT:New( "Marking Targets:\n" )
|
||||
|
||||
self.RecceSet:ForEachGroup(
|
||||
self.RecceSet:ForEachGroupAlive(
|
||||
function( RecceGroup )
|
||||
local RecceUnits = RecceGroup:GetUnits()
|
||||
for UnitID, RecceData in pairs( RecceUnits ) do
|
||||
@@ -812,7 +812,7 @@ do -- DESIGNATE
|
||||
|
||||
self.AttackSet:Flush()
|
||||
|
||||
self.AttackSet:ForEachGroup(
|
||||
self.AttackSet:ForEachGroupAlive(
|
||||
|
||||
--- @param Wrapper.Group#GROUP GroupReport
|
||||
function( AttackGroup )
|
||||
|
||||
@@ -2004,7 +2004,7 @@ do -- DETECTION_UNITS
|
||||
|
||||
local Report = REPORT:New()
|
||||
Report:Add(DetectedItemID .. ", " .. DetectedItemCoordText)
|
||||
Report:Add( string.format( "Threat: [%s]", string.rep( "■", ThreatLevelA2G ) ) )
|
||||
Report:Add( string.format( "Threat: [%s]", string.rep( "■", ThreatLevelA2G ), string.rep( "□", 10-ThreatLevelA2G ) ) )
|
||||
Report:Add( string.format("Type: %s%s", UnitCategoryText, UnitDistanceText ) )
|
||||
return Report
|
||||
end
|
||||
@@ -2236,7 +2236,7 @@ do -- DETECTION_TYPES
|
||||
|
||||
local Report = REPORT:New()
|
||||
Report:Add(DetectedItemID .. ", " .. DetectedItemCoordText)
|
||||
Report:Add( string.format( "Threat: [%s]", string.rep( "■", ThreatLevelA2G ) ) )
|
||||
Report:Add( string.format( "Threat: [%s%s]", string.rep( "■", ThreatLevelA2G ), string.rep( "□", 10-ThreatLevelA2G ) ) )
|
||||
Report:Add( string.format("Type: %2d of %s", DetectedItemsCount, DetectedItemType ) )
|
||||
return Report
|
||||
end
|
||||
@@ -2387,7 +2387,7 @@ do -- DETECTION_AREAS
|
||||
|
||||
local Report = REPORT:New()
|
||||
Report:Add(DetectedItemID .. ", " .. DetectedItemCoordText)
|
||||
Report:Add( string.format( "Threat: [%s]", string.rep( "■", ThreatLevelA2G ) ) )
|
||||
Report:Add( string.format( "Threat: [%s]", string.rep( "■", ThreatLevelA2G ), string.rep( "□", 10-ThreatLevelA2G ) ) )
|
||||
Report:Add( string.format("Type: %2d of %s", DetectedItemsCount, DetectedItemsTypes ) )
|
||||
|
||||
return Report
|
||||
|
||||
Reference in New Issue
Block a user