diff --git a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua index 39e81634a..96fc731d1 100644 --- a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua +++ b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua @@ -2993,7 +2993,7 @@ do -- AI_A2A_DISPATCHER local DetectedZone = DetectedItem.Zone self:F( { "Target ID", DetectedItem.ItemID } ) - DetectedSet:Flush() + DetectedSet:Flush( self ) local DetectedID = DetectedItem.ID local DetectionIndex = DetectedItem.Index diff --git a/Moose Development/Moose/AI/AI_Balancer.lua b/Moose Development/Moose/AI/AI_Balancer.lua index 4f11776fb..18bb5fa65 100644 --- a/Moose Development/Moose/AI/AI_Balancer.lua +++ b/Moose Development/Moose/AI/AI_Balancer.lua @@ -189,9 +189,9 @@ end function AI_BALANCER:onenterDestroying( SetGroup, From, Event, To, ClientName, AIGroup ) AIGroup:Destroy() - SetGroup:Flush() + SetGroup:Flush( self ) SetGroup:Remove( ClientName ) - SetGroup:Flush() + SetGroup:Flush( self ) end --- @param #AI_BALANCER self diff --git a/Moose Development/Moose/AI/AI_Formation.lua b/Moose Development/Moose/AI/AI_Formation.lua index d5801927d..7e5b2828e 100644 --- a/Moose Development/Moose/AI/AI_Formation.lua +++ b/Moose Development/Moose/AI/AI_Formation.lua @@ -671,7 +671,7 @@ end function AI_FORMATION:onafterFormationLine( FollowGroupSet, From , Event , To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace ) --R2.1 self:F( { FollowGroupSet, From , Event ,To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace } ) - FollowGroupSet:Flush() + FollowGroupSet:Flush( self ) local FollowSet = FollowGroupSet:GetSet() diff --git a/Moose Development/Moose/Actions/Act_Pickup.lua b/Moose Development/Moose/Actions/Act_Pickup.lua index af27c11a4..3ef76e0eb 100644 --- a/Moose Development/Moose/Actions/Act_Pickup.lua +++ b/Moose Development/Moose/Actions/Act_Pickup.lua @@ -97,7 +97,7 @@ end function PROCESS_PICKUP:OnHitTarget( Fsm, From, Event, To, Event ) - self.TargetSetUnit:Flush() + self.TargetSetUnit:Flush( self ) if self.TargetSetUnit:FindUnit( Event.IniUnitName ) then self.TargetSetUnit:RemoveUnitsByName( Event.IniUnitName ) diff --git a/Moose Development/Moose/Core/Set.lua b/Moose Development/Moose/Core/Set.lua index 71df11f1c..b02e76168 100644 --- a/Moose Development/Moose/Core/Set.lua +++ b/Moose Development/Moose/Core/Set.lua @@ -613,7 +613,7 @@ function SET_BASE:Flush( MasterObject ) for ObjectName, Object in pairs( self.Set ) do ObjectNames = ObjectNames .. ObjectName .. ", " end - self:I( { MasterObject = MasterObject:GetClassNameAndID(), "Objects in Set:", ObjectNames } ) + self:I( { MasterObject = MasterObject and MasterObject:GetClassNameAndID(), "Objects in Set:", ObjectNames } ) return ObjectNames end diff --git a/Moose Development/Moose/Functional/Designate.lua b/Moose Development/Moose/Functional/Designate.lua index 19e09d6ab..14775c60c 100644 --- a/Moose Development/Moose/Functional/Designate.lua +++ b/Moose Development/Moose/Functional/Designate.lua @@ -771,7 +771,7 @@ do -- DESIGNATE --- @param Wrapper.Group#GROUP AttackGroup function( AttackGroup ) if AttackGroup:IsAlive() == true then - local DetectionText = self.Detection:DetectedItemReportSummary( DesignateIndex, AttackGroup ):Text( ", " ) + local DetectionText = self.Detection:DetectedItemReportSummary( DetectedItem, AttackGroup ):Text( ", " ) self.CC:GetPositionable():MessageToGroup( "Targets out of LOS\n" .. DetectionText, 10, AttackGroup, self.DesignateName ) end end @@ -854,7 +854,7 @@ do -- DESIGNATE for DesignateIndex, Designating in pairs( self.Designating ) do local DetectedItem = DetectedItems[DesignateIndex] if DetectedItem then - local Report = self.Detection:DetectedItemReportSummary( DesignateIndex, AttackGroup ):Text( ", " ) + local Report = self.Detection:DetectedItemReportSummary( DetectedItem, AttackGroup ):Text( ", " ) DetectedReport:Add( string.rep( "-", 140 ) ) DetectedReport:Add( " - " .. Report ) if string.find( Designating, "L" ) then @@ -942,8 +942,8 @@ do -- DESIGNATE if DetectedItem then - local Coord = self.Detection:GetDetectedItemCoordinate( DesignateIndex ) - local ID = self.Detection:GetDetectedItemID( DesignateIndex ) + local Coord = self.Detection:GetDetectedItemCoordinate( DetectedItem ) + local ID = self.Detection:GetDetectedItemID( DetectedItem ) local MenuText = ID --.. ", " .. Coord:ToStringA2G( AttackGroup ) MenuText = string.format( "(%3s) %s", Designating, MenuText ) @@ -1101,14 +1101,15 @@ do -- DESIGNATE function DESIGNATE:onafterLasing( From, Event, To, Index, Duration, LaserCodeRequested ) - local TargetSetUnit = self.Detection:GetDetectedSet( Index ) + local DetectedItem = self.Detection:GetDetectedItemByIndex( Index ) + local TargetSetUnit = self.Detection:GetDetectedSet( DetectedItem ) local MarkingCount = 0 local MarkedTypes = {} local ReportTypes = REPORT:New() local ReportLaserCodes = REPORT:New() - TargetSetUnit:Flush() + TargetSetUnit:Flush( self ) --self:F( { Recces = self.Recces } ) for TargetUnit, RecceData in pairs( self.Recces ) do @@ -1156,7 +1157,7 @@ do -- DESIGNATE if not Recce then self:F( "Lasing..." ) - self.RecceSet:Flush() + self.RecceSet:Flush( self) for RecceGroupID, RecceGroup in pairs( self.RecceSet:GetSet() ) do for UnitID, UnitData in pairs( RecceGroup:GetUnits() or {} ) do @@ -1270,7 +1271,8 @@ do -- DESIGNATE CC:MessageToSetGroup( "Stopped lasing.", 5, self.AttackSet, self.DesignateName ) end - local TargetSetUnit = self.Detection:GetDetectedSet( Index ) + local DetectedItem = self.Detection:GetDetectedItemByIndex( Index ) + local TargetSetUnit = self.Detection:GetDetectedSet( DetectedItem ) local Recces = self.Recces @@ -1294,7 +1296,8 @@ do -- DESIGNATE -- @return #DESIGNATE function DESIGNATE:onafterSmoke( From, Event, To, Index, Color ) - local TargetSetUnit = self.Detection:GetDetectedSet( Index ) + local DetectedItem = self.Detection:GetDetectedItemByIndex( Index ) + local TargetSetUnit = self.Detection:GetDetectedSet( DetectedItem ) local TargetSetUnitCount = TargetSetUnit:Count() local MarkedCount = 0 @@ -1338,7 +1341,8 @@ do -- DESIGNATE -- @return #DESIGNATE function DESIGNATE:onafterIlluminate( From, Event, To, Index ) - local TargetSetUnit = self.Detection:GetDetectedSet( Index ) + local DetectedItem = self.Detection:GetDetectedItemByIndex( Index ) + local TargetSetUnit = self.Detection:GetDetectedSet( DetectedItem ) local TargetUnit = TargetSetUnit:GetFirst() if TargetUnit then diff --git a/Moose Development/Moose/Functional/Detection.lua b/Moose Development/Moose/Functional/Detection.lua index 9666fc488..e24d4482c 100644 --- a/Moose Development/Moose/Functional/Detection.lua +++ b/Moose Development/Moose/Functional/Detection.lua @@ -1729,7 +1729,7 @@ do -- DETECTION_BASE -- @param Core.Settings#SETTINGS Settings Message formatting settings to use. -- @return Core.Report#REPORT function DETECTION_BASE:DetectedItemReportSummary( DetectedItem, AttackGroup, Settings ) - self:F( Index ) + self:F() return nil end @@ -2707,7 +2707,7 @@ do -- DETECTION_AREAS DetectedZone.ZoneUNIT:SmokeRed() end - --DetectedSet:Flush() + --DetectedSet:Flush( self ) DetectedSet:ForEachUnit( --- @param Wrapper.Unit#UNIT DetectedUnit diff --git a/Moose Development/Moose/Functional/Protect.lua b/Moose Development/Moose/Functional/Protect.lua index f0f2ef260..f8375b867 100644 --- a/Moose Development/Moose/Functional/Protect.lua +++ b/Moose Development/Moose/Functional/Protect.lua @@ -113,7 +113,7 @@ function PROTECT:AreProtectUnitsAlive() local IsAlive = false local UnitSet = self.ProtectUnitSet - UnitSet:Flush() + UnitSet:Flush( self ) local UnitList = UnitSet:GetSet() for UnitID, ProtectUnit in pairs( UnitList ) do @@ -134,7 +134,7 @@ function PROTECT:AreProtectStaticsAlive() local IsAlive = false local StaticSet = self.ProtectStaticSet - StaticSet:Flush() + StaticSet:Flush( self ) local StaticList = StaticSet:GetSet() for UnitID, ProtectStatic in pairs( StaticList ) do @@ -154,7 +154,7 @@ end function PROTECT:IsCaptureUnitInZone() local CaptureUnitSet = self.CaptureUnitSet - CaptureUnitSet:Flush() + CaptureUnitSet:Flush( self ) local IsInZone = self.CaptureUnitSet:IsPartiallyInZone( self.ProtectZone ) diff --git a/Moose Development/Moose/Tasking/Task.lua b/Moose Development/Moose/Tasking/Task.lua index 7f8841095..5b2f86deb 100644 --- a/Moose Development/Moose/Tasking/Task.lua +++ b/Moose Development/Moose/Tasking/Task.lua @@ -323,7 +323,7 @@ function TASK:AbortGroup( PlayerGroup ) -- Now check if the task needs to go to hold... -- It will go to hold, if there are no players in the mission... - PlayerGroups:Flush() + PlayerGroups:Flush( self ) local IsRemaining = false for GroupName, AssignedGroup in pairs( PlayerGroups:GetSet() or {} ) do if self:IsGroupAssigned( AssignedGroup ) == true then @@ -374,7 +374,7 @@ function TASK:CrashGroup( PlayerGroup ) -- Now check if the task needs to go to hold... -- It will go to hold, if there are no players in the mission... - PlayerGroups:Flush() + PlayerGroups:Flush( self ) local IsRemaining = false for GroupName, AssignedGroup in pairs( PlayerGroups:GetSet() or {} ) do if self:IsGroupAssigned( AssignedGroup ) == true then diff --git a/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua b/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua index 18d48e9e4..9561dc568 100644 --- a/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua +++ b/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua @@ -375,7 +375,7 @@ do -- TASK_A2A_DISPATCHER end local DetectedSet = DetectedItem.Set -- Core.Set#SET_UNIT - --DetectedSet:Flush() + --DetectedSet:Flush( self ) --self:F( { DetectedSetCount = DetectedSet:Count() } ) if DetectedSet:Count() == 0 then Remove = true @@ -524,7 +524,7 @@ do -- TASK_A2A_DISPATCHER local DetectedCount = DetectedSet:Count() local DetectedZone = DetectedItem.Zone --self:F( { "Targets in DetectedItem", DetectedItem.ItemID, DetectedSet:Count(), tostring( DetectedItem ) } ) - --DetectedSet:Flush() + --DetectedSet:Flush( self ) local DetectedID = DetectedItem.ID local TaskIndex = DetectedItem.Index diff --git a/Moose Development/Moose/Tasking/Task_A2G_Dispatcher.lua b/Moose Development/Moose/Tasking/Task_A2G_Dispatcher.lua index d47aa8b95..256ca2db2 100644 --- a/Moose Development/Moose/Tasking/Task_A2G_Dispatcher.lua +++ b/Moose Development/Moose/Tasking/Task_A2G_Dispatcher.lua @@ -621,7 +621,7 @@ do -- TASK_A2G_DISPATCHER local DetectedSet = DetectedItem.Set -- Core.Set#SET_UNIT local DetectedZone = DetectedItem.Zone --self:F( { "Targets in DetectedItem", DetectedItem.ItemID, DetectedSet:Count(), tostring( DetectedItem ) } ) - --DetectedSet:Flush() + --DetectedSet:Flush( self ) local DetectedItemID = DetectedItem.ID local TaskIndex = DetectedItem.ID