diff --git a/Moose Development/Moose/Tasking/Task_A2G.lua b/Moose Development/Moose/Tasking/Task_A2G.lua index 28c01fb15..84bdcf360 100644 --- a/Moose Development/Moose/Tasking/Task_A2G.lua +++ b/Moose Development/Moose/Tasking/Task_A2G.lua @@ -175,19 +175,19 @@ do -- TASK_A2G end - --- @param #TASK_A2G self + -- @param #TASK_A2G self -- @param Core.Set#SET_UNIT TargetSetUnit The set of targets. function TASK_A2G:SetTargetSetUnit( TargetSetUnit ) self.TargetSetUnit = TargetSetUnit end - --- @param #TASK_A2G self + -- @param #TASK_A2G self function TASK_A2G:GetPlannedMenuText() return self:GetStateString() .. " - " .. self:GetTaskName() .. " ( " .. self.TargetSetUnit:GetUnitTypesText() .. " )" end - --- @param #TASK_A2G self + -- @param #TASK_A2G self -- @param Core.Point#COORDINATE RendezVousCoordinate The Coordinate object referencing to the 2D point where the RendezVous point is located on the map. -- @param #number RendezVousRange The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point. -- @param Wrapper.Unit#UNIT TaskUnit @@ -200,7 +200,7 @@ do -- TASK_A2G ActRouteRendezVous:SetRange( RendezVousRange ) end - --- @param #TASK_A2G self + -- @param #TASK_A2G self -- @param Wrapper.Unit#UNIT TaskUnit -- @return Core.Point#COORDINATE The Coordinate object referencing to the 2D point where the RendezVous point is located on the map. -- @return #number The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point. @@ -212,7 +212,7 @@ do -- TASK_A2G return ActRouteRendezVous:GetCoordinate(), ActRouteRendezVous:GetRange() end - --- @param #TASK_A2G self + -- @param #TASK_A2G self -- @param Core.Zone#ZONE_BASE RendezVousZone The Zone object where the RendezVous is located on the map. -- @param Wrapper.Unit#UNIT TaskUnit function TASK_A2G:SetRendezVousZone( RendezVousZone, TaskUnit ) @@ -223,7 +223,7 @@ do -- TASK_A2G ActRouteRendezVous:SetZone( RendezVousZone ) end - --- @param #TASK_A2G self + -- @param #TASK_A2G self -- @param Wrapper.Unit#UNIT TaskUnit -- @return Core.Zone#ZONE_BASE The Zone object where the RendezVous is located on the map. function TASK_A2G:GetRendezVousZone( TaskUnit ) @@ -234,7 +234,7 @@ do -- TASK_A2G return ActRouteRendezVous:GetZone() end - --- @param #TASK_A2G self + -- @param #TASK_A2G self -- @param Core.Point#COORDINATE TargetCoordinate The Coordinate object where the Target is located on the map. -- @param Wrapper.Unit#UNIT TaskUnit function TASK_A2G:SetTargetCoordinate( TargetCoordinate, TaskUnit ) @@ -245,7 +245,7 @@ do -- TASK_A2G ActRouteTarget:SetCoordinate( TargetCoordinate ) end - --- @param #TASK_A2G self + -- @param #TASK_A2G self -- @param Wrapper.Unit#UNIT TaskUnit -- @return Core.Point#COORDINATE The Coordinate object where the Target is located on the map. function TASK_A2G:GetTargetCoordinate( TaskUnit ) @@ -256,7 +256,7 @@ do -- TASK_A2G return ActRouteTarget:GetCoordinate() end - --- @param #TASK_A2G self + -- @param #TASK_A2G self -- @param Core.Zone#ZONE_BASE TargetZone The Zone object where the Target is located on the map. -- @param Wrapper.Unit#UNIT TaskUnit function TASK_A2G:SetTargetZone( TargetZone, TaskUnit ) @@ -267,7 +267,7 @@ do -- TASK_A2G ActRouteTarget:SetZone( TargetZone ) end - --- @param #TASK_A2G self + -- @param #TASK_A2G self -- @param Wrapper.Unit#UNIT TaskUnit -- @return Core.Zone#ZONE_BASE The Zone object where the Target is located on the map. function TASK_A2G:GetTargetZone( TaskUnit ) @@ -280,7 +280,7 @@ do -- TASK_A2G function TASK_A2G:SetGoalTotal() - self.GoalTotal = self.TargetSetUnit:Count() + self.GoalTotal = self.TargetSetUnit:CountAlive() end function TASK_A2G:GetGoalTotal() @@ -304,14 +304,14 @@ do -- TASK_A2G function TASK_A2G:onafterGoal( TaskUnit, From, Event, To ) local TargetSetUnit = self.TargetSetUnit -- Core.Set#SET_UNIT - if TargetSetUnit:Count() == 0 then + if TargetSetUnit:CountAlive() == 0 then self:Success() end self:__Goal( -10 ) end - --- @param #TASK_A2G self + -- @param #TASK_A2G self function TASK_A2G:UpdateTaskInfo( DetectedItem ) if self:IsStatePlanned() or self:IsStateAssigned() then @@ -328,7 +328,7 @@ do -- TASK_A2G self.TaskInfo:AddThreat( ThreatText, ThreatLevel, 10, "MOD", true ) if self.Detection then - local DetectedItemsCount = self.TargetSetUnit:Count() + local DetectedItemsCount = self.TargetSetUnit:CountAlive() local ReportTypes = REPORT:New() local TargetTypes = {} for TargetUnitName, TargetUnit in pairs( self.TargetSetUnit:GetSet() ) do @@ -341,7 +341,7 @@ do -- TASK_A2G self.TaskInfo:AddTargetCount( DetectedItemsCount, 11, "O", true ) self.TaskInfo:AddTargets( DetectedItemsCount, ReportTypes:Text( ", " ), 20, "D", true ) else - local DetectedItemsCount = self.TargetSetUnit:Count() + local DetectedItemsCount = self.TargetSetUnit:CountAlive() local DetectedItemsTypes = self.TargetSetUnit:GetTypeNames() self.TaskInfo:AddTargetCount( DetectedItemsCount, 11, "O", true ) self.TaskInfo:AddTargets( DetectedItemsCount, DetectedItemsTypes, 20, "D", true )