mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Progress
- Removed the old classes and moved into an "Old" folder in the Moose/Development folder. -- Cleaned Moose.lua + Documented class types -- Cleaned Create_Moose.bat + Documented class types - Extend the ZONE_BASE class with a probability randomization factor, that can be used for zone randomization purposes. - Documented the Zone module classes. - Changed and removed the POINT_VEC3 SmokeColor and FlareColor structure. Replaced with SMOKECOLOR and FLARECOLOR types. -- Replaced also code in test missions with SMOKECOLOR and FLARECOLOR references. - Renamed UnControlled() method to InitUnControlled method.
This commit is contained in:
41
Moose Development/Old/DestroyRadarsTask.lua
Normal file
41
Moose Development/Old/DestroyRadarsTask.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
--- Task class to destroy radar installations.
|
||||
-- @module DESTROYRADARSTASK
|
||||
|
||||
|
||||
|
||||
--- The DESTROYRADARS class
|
||||
-- @type
|
||||
DESTROYRADARSTASK = {
|
||||
ClassName = "DESTROYRADARSTASK",
|
||||
GoalVerb = "Destroy Radars"
|
||||
}
|
||||
|
||||
--- Creates a new 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 )
|
||||
local self = BASE:Inherit( self, DESTROYGROUPSTASK:New( 'radar installations', 'radars', DestroyGroupNames ) )
|
||||
self:F()
|
||||
|
||||
self.Name = 'Destroy Radars'
|
||||
|
||||
_EVENTDISPATCHER:OnDead( self.EventDead , self )
|
||||
|
||||
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 )
|
||||
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
|
||||
self:T( 'Destroyed a radar' )
|
||||
DestroyCount = 1
|
||||
end
|
||||
end
|
||||
return DestroyCount
|
||||
end
|
||||
Reference in New Issue
Block a user