Lots of changes done...

Change trace prototypes.
Change DCS class prototypes
This commit is contained in:
FlightControl
2016-03-28 22:54:31 +02:00
parent 8eab8622c6
commit 260f109e40
40 changed files with 1251 additions and 1073 deletions

View File

@@ -14,29 +14,26 @@ DESTROYRADARSTASK = {
-- @param table{string,...} DestroyGroupNames Table of string containing the group names of which the radars are be destroyed.
-- @return DESTROYRADARSTASK
function DESTROYRADARSTASK:New( DestroyGroupNames )
trace.f(self.ClassName)
-- Inheritance
local Child = BASE:Inherit( self, DESTROYGROUPSTASK:New( 'radar installations', 'radars', DestroyGroupNames ) )
Child.Name = 'Destroy Radars'
local self = BASE:Inherit( self, DESTROYGROUPSTASK:New( 'radar installations', 'radars', DestroyGroupNames ) )
self:F()
self.Name = 'Destroy Radars'
Child.AddEvent( Child, world.event.S_EVENT_DEAD, Child.EventDead )
self:AddEvent( world.event.S_EVENT_DEAD, self.EventDead )
return Child
return self
end
--- Report Goal Progress.
-- @param Group DestroyGroup Group structure describing the group to be evaluated.
-- @param Unit DestroyUnit Unit structure describing the Unit to be evaluated.
function DESTROYRADARSTASK:ReportGoalProgress( DestroyGroup, DestroyUnit )
trace.f(self.ClassName)
self:F( { DestroyGroup, DestroyUnit } )
local DestroyCount = 0
if DestroyUnit and DestroyUnit:hasSensors( Unit.SensorType.RADAR, Unit.RadarType.AS ) then
if DestroyUnit and DestroyUnit:getLife() <= 1.0 then
trace.i( self.ClassName, 'Destroyed a radar' )
self:T( 'Destroyed a radar' )
DestroyCount = 1
end
end