MOOSE/Moose Development/Old/RouteTask.lua
Sven Van de Velde 7cda194f45 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.
2016-08-15 12:30:36 +02:00

42 lines
1.4 KiB
Lua

--- A ROUTETASK orchestrates the travel to a specific zone defined within the ME.
-- @module ROUTETASK
--- The ROUTETASK class
-- @type
ROUTETASK = {
ClassName = "ROUTETASK",
GoalVerb = "Route",
}
--- Creates a new ROUTETASK.
-- @param table{sring,...}|string LandingZones Table of Zone Names where the target is located.
-- @param string TaskBriefing (optional) Defines a text describing the briefing of the task.
-- @return ROUTETASK
function ROUTETASK:New( LandingZones, TaskBriefing )
local self = BASE:Inherit( self, TASK:New() )
self:F( { LandingZones, TaskBriefing } )
local Valid = true
Valid = routines.ValidateZone( LandingZones, "LandingZones", Valid )
if Valid then
self.Name = 'Route To Zone'
if TaskBriefing then
self.TaskBriefing = TaskBriefing .. " Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to the target objective."
else
self.TaskBriefing = "Task: Fly to specified zone(s). Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to the target objective."
end
if type( LandingZones ) == "table" then
self.LandingZones = LandingZones
else
self.LandingZones = { LandingZones }
end
self.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEROUTE:New(), STAGEARRIVE:New(), STAGEDONE:New() }
self.SetStage( self, 1 )
end
return self
end