This commit is contained in:
FlightControl
2017-06-06 14:43:40 +02:00
parent 37a176e3ae
commit 2fb83c89af
8 changed files with 541 additions and 367 deletions

View File

@@ -611,7 +611,7 @@ do -- DETECTION_BASE
if self.AcceptZones then
for AcceptZoneID, AcceptZone in pairs( self.AcceptZones ) do
local AcceptZone = AcceptZone -- Core.Zone#ZONE_BASE
if AcceptZone:IsPointVec2InZone( DetectedObjectVec2 ) == false then
if AcceptZone:IsVec2InZone( DetectedObjectVec2 ) == false then
DetectionAccepted = false
end
end
@@ -759,6 +759,25 @@ do -- DETECTION_BASE
return self
end
--- Forget a Unit from a DetectionItem
-- @param #DETECTION_BASE self
-- @param #string UnitName The UnitName that needs to be forgotten from the DetectionItem Sets.
-- @return #DETECTION_BASE
function DETECTION_BASE:ForgetDetectedUnit( UnitName )
self:F2()
local DetectedItems = self:GetDetectedItems()
for DetectedItemIndex, DetectedItem in pairs( DetectedItems ) do
local DetectedSet = self:GetDetectedSet( DetectedItemIndex )
if DetectedSet then
DetectedSet:RemoveUnitsByName( UnitName )
end
end
return self
end
--- Make a DetectionSet table. This function will be overridden in the derived clsses.
-- @param #DETECTION_BASE self