mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Fixing SCHEDULER - TO BE FURTHER STUDIES AND FIXED
TASK object should dissapear after nillified. They are hooked to the SCHEDULER... SCHEDULEs should dissapear, but they don't.... To be further studied.
This commit is contained in:
@@ -522,6 +522,31 @@ function UNIT:GetLife0()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns the category name of the #UNIT.
|
||||
-- @param #UNIT self
|
||||
-- @return #string Category name = Helicopter, Airplane, Ground Unit, Ship
|
||||
function UNIT:GetCategoryName()
|
||||
self:F3( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSObject()
|
||||
if DCSUnit then
|
||||
local CategoryNames = {
|
||||
[Unit.Category.AIRPLANE] = "Airplane",
|
||||
[Unit.Category.HELICOPTER] = "Helicopter",
|
||||
[Unit.Category.GROUND_UNIT] = "Ground Unit",
|
||||
[Unit.Category.SHIP] = "Ship",
|
||||
[Unit.Category.STRUCTURE] = "Structure",
|
||||
}
|
||||
local UnitCategory = DCSUnit:getDesc().category
|
||||
self:T3( UnitCategory )
|
||||
|
||||
return CategoryNames[UnitCategory]
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- Returns the Unit's A2G threat level on a scale from 1 to 10 ...
|
||||
-- The following threat levels are foreseen:
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user