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:
FlightControl
2017-03-14 03:36:12 +01:00
parent 32d23927b6
commit fe79821474
10 changed files with 268 additions and 87 deletions

View File

@@ -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:
--