mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Documentation + Fixing bugs in CleanUp class related to client bug in 1.5.3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--- The TASK Classes define major end-to-end activities within a MISSION. The TASK Class is the Master Class to orchestrate these activities. From this class, many concrete TASK classes are inherited.
|
||||
-- @classmod TASK
|
||||
-- @module TASK
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
@@ -7,6 +7,8 @@ Include.File( "Mission" )
|
||||
Include.File( "Client" )
|
||||
Include.File( "Stage" )
|
||||
|
||||
--- The TASK class
|
||||
-- @type
|
||||
TASK = {
|
||||
|
||||
-- Defines the different signal types with a Task.
|
||||
@@ -43,7 +45,7 @@ TASK = {
|
||||
}
|
||||
|
||||
--- Instantiates a new TASK Base. Should never be used. Interface Class.
|
||||
-- @treturn TASK
|
||||
-- @return TASK
|
||||
function TASK:New()
|
||||
trace.f(self.ClassName)
|
||||
|
||||
@@ -87,7 +89,7 @@ end
|
||||
|
||||
|
||||
--- Get progress of a TASK.
|
||||
-- @treturn string GoalsText
|
||||
-- @return string GoalsText
|
||||
function TASK:GetGoalProgress()
|
||||
trace.f(self.ClassName)
|
||||
|
||||
@@ -110,8 +112,8 @@ trace.f(self.ClassName)
|
||||
end
|
||||
|
||||
--- Show progress of a TASK.
|
||||
-- @tparam MISSION Mission Group structure describing the Mission.
|
||||
-- @tparam CLIENT Client Group structure describing the Client.
|
||||
-- @param MISSION Mission Group structure describing the Mission.
|
||||
-- @param CLIENT Client Group structure describing the Client.
|
||||
function TASK:ShowGoalProgress( Mission, Client )
|
||||
trace.f(self.ClassName)
|
||||
|
||||
@@ -140,7 +142,7 @@ trace.f(self.ClassName)
|
||||
end
|
||||
|
||||
--- Returns if a TASK is done.
|
||||
-- @treturn bool
|
||||
-- @return bool
|
||||
function TASK:IsDone()
|
||||
trace.i( self.ClassName, self.TaskDone )
|
||||
return self.TaskDone
|
||||
@@ -165,14 +167,14 @@ trace.f(self.ClassName)
|
||||
end
|
||||
|
||||
--- Returns the Goals of a TASK
|
||||
-- @treturn @table Goals
|
||||
-- @return @table Goals
|
||||
function TASK:GetGoals()
|
||||
return self.GoalTasks
|
||||
end
|
||||
|
||||
--- Returns if a TASK has Goal(s).
|
||||
-- @tparam ?string GoalVerb is the name of the Goal of the TASK.
|
||||
-- @treturn bool
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK.
|
||||
-- @return bool
|
||||
function TASK:Goal( GoalVerb )
|
||||
trace.f(self.ClassName)
|
||||
if not GoalVerb then
|
||||
@@ -186,8 +188,8 @@ trace.f(self.ClassName)
|
||||
end
|
||||
|
||||
--- Sets the total Goals to be achieved of the Goal Name
|
||||
-- @tparam number GoalTotal is the number of times the GoalVerb needs to be achieved.
|
||||
-- @tparam ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @param number GoalTotal is the number of times the GoalVerb needs to be achieved.
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
function TASK:SetGoalTotal( GoalTotal, GoalVerb )
|
||||
trace.f(self.ClassName, { GoalTotal, GoalVerb } )
|
||||
|
||||
@@ -202,7 +204,7 @@ trace.f(self.ClassName, { GoalTotal, GoalVerb } )
|
||||
end
|
||||
|
||||
--- Gets the total of Goals to be achieved within the TASK of the GoalVerb.
|
||||
-- @tparam ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
function TASK:GetGoalTotal( GoalVerb )
|
||||
trace.f(self.ClassName)
|
||||
if not GoalVerb then
|
||||
@@ -216,9 +218,9 @@ trace.f(self.ClassName)
|
||||
end
|
||||
|
||||
--- Sets the total of Goals currently achieved within the TASK of the GoalVerb.
|
||||
-- @tparam number GoalCount is the total number of Goals achieved within the TASK.
|
||||
-- @tparam ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @treturn TASK
|
||||
-- @param number GoalCount is the total number of Goals achieved within the TASK.
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:SetGoalCount( GoalCount, GoalVerb )
|
||||
trace.f(self.ClassName)
|
||||
if not GoalVerb then
|
||||
@@ -231,9 +233,9 @@ trace.f(self.ClassName)
|
||||
end
|
||||
|
||||
--- Increments the total of Goals currently achieved within the TASK of the GoalVerb, with the given GoalCountIncrease.
|
||||
-- @tparam number GoalCountIncrease is the number of new Goals achieved within the TASK.
|
||||
-- @tparam ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @treturn TASK
|
||||
-- @param number GoalCountIncrease is the number of new Goals achieved within the TASK.
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:IncreaseGoalCount( GoalCountIncrease, GoalVerb )
|
||||
trace.f(self.ClassName)
|
||||
if not GoalVerb then
|
||||
@@ -246,8 +248,8 @@ trace.f(self.ClassName)
|
||||
end
|
||||
|
||||
--- Gets the total of Goals currently achieved within the TASK of the GoalVerb.
|
||||
-- @tparam ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @treturn TASK
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:GetGoalCount( GoalVerb )
|
||||
trace.f(self.ClassName)
|
||||
if not GoalVerb then
|
||||
@@ -261,8 +263,8 @@ trace.f(self.ClassName)
|
||||
end
|
||||
|
||||
--- Gets the percentage of Goals currently achieved within the TASK of the GoalVerb.
|
||||
-- @tparam ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @treturn TASK
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:GetGoalPercentage( GoalVerb )
|
||||
trace.f(self.ClassName)
|
||||
if not GoalVerb then
|
||||
@@ -276,7 +278,7 @@ trace.f(self.ClassName)
|
||||
end
|
||||
|
||||
--- Returns if all the Goals of the TASK were achieved.
|
||||
-- @treturn bool
|
||||
-- @return bool
|
||||
function TASK:IsGoalReached( )
|
||||
|
||||
local GoalReached = true
|
||||
@@ -301,9 +303,9 @@ function TASK:IsGoalReached( )
|
||||
end
|
||||
|
||||
--- Adds an Additional Goal for the TASK to be achieved.
|
||||
-- @tparam string GoalVerb is the name of the Goal of the TASK.
|
||||
-- @tparam string GoalTask is a text describing the Goal of the TASK to be achieved.
|
||||
-- @tparam number GoalIncrease is a number by which the Goal achievement is increasing.
|
||||
-- @param string GoalVerb is the name of the Goal of the TASK.
|
||||
-- @param string GoalTask is a text describing the Goal of the TASK to be achieved.
|
||||
-- @param number GoalIncrease is a number by which the Goal achievement is increasing.
|
||||
function TASK:AddGoalCompletion( GoalVerb, GoalTask, GoalIncrease )
|
||||
trace.f( self.ClassName, { GoalVerb, GoalTask, GoalIncrease } )
|
||||
|
||||
@@ -315,8 +317,8 @@ trace.f( self.ClassName, { GoalVerb, GoalTask, GoalIncrease } )
|
||||
end
|
||||
|
||||
--- Returns if the additional Goal for the TASK was completed.
|
||||
-- @tparam ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @treturn string Goals
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return string Goals
|
||||
function TASK:GetGoalCompletion( GoalVerb )
|
||||
trace.f( self.ClassName, { GoalVerb } )
|
||||
|
||||
@@ -382,80 +384,80 @@ trace.f(self.ClassName)
|
||||
end
|
||||
|
||||
--- When the CLIENT is approaching the landing zone, a RED SMOKE will be fired by an optional SignalUnitNames.
|
||||
-- @tparam table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @tparam number SignalHeight Altitude that the Signal should be fired...
|
||||
-- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @param number SignalHeight Altitude that the Signal should be fired...
|
||||
function TASK:AddSmokeRed( SignalUnitNames, SignalHeight )
|
||||
trace.f(self.ClassName)
|
||||
self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.SMOKE, TASK.SIGNAL.COLOR.RED, SignalHeight )
|
||||
end
|
||||
|
||||
--- When the CLIENT is approaching the landing zone, a GREEN SMOKE will be fired by an optional SignalUnitNames.
|
||||
-- @tparam table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @tparam number SignalHeight Altitude that the Signal should be fired...
|
||||
-- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @param number SignalHeight Altitude that the Signal should be fired...
|
||||
function TASK:AddSmokeGreen( SignalUnitNames, SignalHeight )
|
||||
trace.f(self.ClassName)
|
||||
self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.SMOKE, TASK.SIGNAL.COLOR.GREEN, SignalHeight )
|
||||
end
|
||||
|
||||
--- When the CLIENT is approaching the landing zone, a BLUE SMOKE will be fired by an optional SignalUnitNames.
|
||||
-- @tparam table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @tparam number SignalHeight Altitude that the Signal should be fired...
|
||||
-- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @param number SignalHeight Altitude that the Signal should be fired...
|
||||
function TASK:AddSmokeBlue( SignalUnitNames, SignalHeight )
|
||||
trace.f(self.ClassName)
|
||||
self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.SMOKE, TASK.SIGNAL.COLOR.BLUE, SignalHeight )
|
||||
end
|
||||
|
||||
--- When the CLIENT is approaching the landing zone, a WHITE SMOKE will be fired by an optional SignalUnitNames.
|
||||
-- @tparam table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @tparam number SignalHeight Altitude that the Signal should be fired...
|
||||
-- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @param number SignalHeight Altitude that the Signal should be fired...
|
||||
function TASK:AddSmokeWhite( SignalUnitNames, SignalHeight )
|
||||
trace.f(self.ClassName)
|
||||
self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.SMOKE, TASK.SIGNAL.COLOR.WHITE, SignalHeight )
|
||||
end
|
||||
|
||||
--- When the CLIENT is approaching the landing zone, an ORANGE SMOKE will be fired by an optional SignalUnitNames.
|
||||
-- @tparam table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @tparam number SignalHeight Altitude that the Signal should be fired...
|
||||
-- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @param number SignalHeight Altitude that the Signal should be fired...
|
||||
function TASK:AddSmokeOrange( SignalUnitNames, SignalHeight )
|
||||
trace.f(self.ClassName)
|
||||
self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.SMOKE, TASK.SIGNAL.COLOR.ORANGE, SignalHeight )
|
||||
end
|
||||
|
||||
--- When the CLIENT is approaching the landing zone, a RED FLARE will be fired by an optional SignalUnitNames.
|
||||
-- @tparam table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @tparam number SignalHeight Altitude that the Signal should be fired...
|
||||
-- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @param number SignalHeight Altitude that the Signal should be fired...
|
||||
function TASK:AddFlareRed( SignalUnitNames, SignalHeight )
|
||||
trace.f(self.ClassName)
|
||||
self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.FLARE, TASK.SIGNAL.COLOR.RED, SignalHeight )
|
||||
end
|
||||
|
||||
--- When the CLIENT is approaching the landing zone, a GREEN FLARE will be fired by an optional SignalUnitNames.
|
||||
-- @tparam table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @tparam number SignalHeight Altitude that the Signal should be fired...
|
||||
-- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @param number SignalHeight Altitude that the Signal should be fired...
|
||||
function TASK:AddFlareGreen( SignalUnitNames, SignalHeight )
|
||||
trace.f(self.ClassName)
|
||||
self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.FLARE, TASK.SIGNAL.COLOR.GREEN, SignalHeight )
|
||||
end
|
||||
|
||||
--- When the CLIENT is approaching the landing zone, a BLUE FLARE will be fired by an optional SignalUnitNames.
|
||||
-- @tparam table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @tparam number SignalHeight Altitude that the Signal should be fired...
|
||||
-- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @param number SignalHeight Altitude that the Signal should be fired...
|
||||
function TASK:AddFlareBlue( SignalUnitNames, SignalHeight )
|
||||
trace.f(self.ClassName)
|
||||
self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.FLARE, TASK.SIGNAL.COLOR.BLUE, SignalHeight )
|
||||
end
|
||||
|
||||
--- When the CLIENT is approaching the landing zone, a WHITE FLARE will be fired by an optional SignalUnitNames.
|
||||
-- @tparam table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @tparam number SignalHeight Altitude that the Signal should be fired...
|
||||
-- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @param number SignalHeight Altitude that the Signal should be fired...
|
||||
function TASK:AddFlareWhite( SignalUnitNames, SignalHeight )
|
||||
trace.f(self.ClassName)
|
||||
self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.FLARE, TASK.SIGNAL.COLOR.WHITE, SignalHeight )
|
||||
end
|
||||
|
||||
--- When the CLIENT is approaching the landing zone, an ORANGE FLARE will be fired by an optional SignalUnitNames.
|
||||
-- @tparam table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @tparam number SignalHeight Altitude that the Signal should be fired...
|
||||
-- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone.
|
||||
-- @param number SignalHeight Altitude that the Signal should be fired...
|
||||
function TASK:AddFlareOrange( SignalUnitNames, SignalHeight )
|
||||
trace.f(self.ClassName)
|
||||
self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.FLARE, TASK.SIGNAL.COLOR.ORANGE, SignalHeight )
|
||||
|
||||
Reference in New Issue
Block a user