UNIT/GROUP - added function to get the skill of a unit. SEAD - added functionality to calculate time-2-impact of HARMS and adjust behaviour accordingly

This commit is contained in:
Applevangelist
2021-08-27 14:56:16 +02:00
parent 5172619cb1
commit 7f18ea0e7a
5 changed files with 149 additions and 45 deletions

View File

@@ -1426,3 +1426,13 @@ function UNIT:EnableEmission(switch)
return self
end
--- Get skill from Unit.
-- @param #UNIT self
-- @return #string Skill String of skill name.
function UNIT:GetSkill()
self:F2( self.UnitName )
local name = self.UnitName
local skill = _DATABASE.Templates.Units[name].Template.skill or "Random"
return skill
end