mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Added functions for rescue mission.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
Include.File( "Message" )
|
||||
Include.File( "Unit" )
|
||||
|
||||
GROUPS = {}
|
||||
|
||||
@@ -13,9 +14,8 @@ GROUP = {
|
||||
}
|
||||
|
||||
function GROUP:New( _Group )
|
||||
trace.f( self.ClassName, _Group:getName() )
|
||||
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:T( _Group:getName() )
|
||||
|
||||
self._Group = _Group
|
||||
self.GroupName = _Group:getName()
|
||||
@@ -25,12 +25,25 @@ trace.f( self.ClassName, _Group:getName() )
|
||||
end
|
||||
|
||||
|
||||
function GROUP:NewFromName( GroupName )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:T( GroupName )
|
||||
|
||||
self._Group = Group.getByName( GroupName )
|
||||
self.GroupName = self._Group:getName()
|
||||
self.GroupID = self._Group:getID()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
function GROUP:GetName()
|
||||
self:T( self.GroupName )
|
||||
|
||||
return self.GroupName
|
||||
end
|
||||
|
||||
|
||||
function GROUP:Destroy()
|
||||
self:T( self.GroupName )
|
||||
|
||||
@@ -41,6 +54,13 @@ function GROUP:Destroy()
|
||||
self._Group:destroy()
|
||||
end
|
||||
|
||||
|
||||
function GROUP:GetUnit( UnitNumber )
|
||||
self:T( self.GroupName )
|
||||
return UNIT:New( self._Group:getUnit( UnitNumber ) )
|
||||
end
|
||||
|
||||
|
||||
function GROUP:IsAir()
|
||||
self:T()
|
||||
|
||||
@@ -50,6 +70,7 @@ self:T()
|
||||
return IsAirResult
|
||||
end
|
||||
|
||||
|
||||
function GROUP:AllOnGround()
|
||||
self:T()
|
||||
|
||||
@@ -106,6 +127,7 @@ trace.f( self.ClassName, { self.GroupName, Point, Duration } )
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
function GROUP:Embarking( Point, Duration, EmbarkingGroup )
|
||||
trace.f( self.ClassName, { self.GroupName, Point, Duration, EmbarkingGroup._Group } )
|
||||
|
||||
@@ -130,6 +152,7 @@ trace.f( self.ClassName, { self.GroupName, Point, Duration, EmbarkingGroup._Grou
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
function GROUP:EmbarkToTransport( Point, Radius )
|
||||
trace.f( self.ClassName, { self.GroupName, Point, Radius } )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user