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:
33
Moose Development/Old/GoHomeTask.lua
Normal file
33
Moose Development/Old/GoHomeTask.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
--- A GOHOMETASK orchestrates the travel back to the home base, which is a specific zone defined within the ME.
|
||||
-- @module GOHOMETASK
|
||||
|
||||
--- The GOHOMETASK class
|
||||
-- @type
|
||||
GOHOMETASK = {
|
||||
ClassName = "GOHOMETASK",
|
||||
}
|
||||
|
||||
--- Creates a new GOHOMETASK.
|
||||
-- @param table{string,...}|string LandingZones Table of Landing Zone names where Home(s) are located.
|
||||
-- @return GOHOMETASK
|
||||
function GOHOMETASK:New( LandingZones )
|
||||
local self = BASE:Inherit( self, TASK:New() )
|
||||
self:F( { LandingZones } )
|
||||
local Valid = true
|
||||
|
||||
Valid = routines.ValidateZone( LandingZones, "LandingZones", Valid )
|
||||
|
||||
if Valid then
|
||||
self.Name = 'Fly Home'
|
||||
self.TaskBriefing = "Task: Fly back to your home base. Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to your home base."
|
||||
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
|
||||
Reference in New Issue
Block a user