diff --git a/Moose Development/Moose/Utilities/Enums.lua b/Moose Development/Moose/Utilities/Enums.lua index e11044f81..bdcea66a8 100644 --- a/Moose Development/Moose/Utilities/Enums.lua +++ b/Moose Development/Moose/Utilities/Enums.lua @@ -483,7 +483,8 @@ ENUMS.ReportingName = Mirage = "Mirage", -- various non-NATO -- Bomber H6J = "H6-J", - Bear = "Tu-142", -- also Tu-95 + Sea_Bear = "Tu-142", -- also Tu-95 + Bear = "Tu-95", -- also Tu-142 Blinder = "Tu-22", Blackjack = "Tu-160", -- AIC / Transport / Other diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index bd5ac2a48..822b98696 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -900,6 +900,24 @@ function GROUP:GetTypeName() return nil end +--- [AIRPLANE] Get the NATO reporting name of a UNIT. Currently airplanes only! +--@param #UNIT self +--@return #string NatoReportingName or "Bogey" if unknown. +function GROUP:GetNatoReportingName() + self:F2( self.GroupName ) + + local DCSGroup = self:GetDCSObject() + + if DCSGroup then + local GroupTypeName = DCSGroup:getUnit(1):getTypeName() + self:T3( GroupTypeName ) + return UTILS.GetReportingName(GroupTypeName) + end + + return "Bogey" + +end + --- Gets the player name of the group. -- @param #GROUP self -- @return #string The player name of the group. diff --git a/Moose Development/Moose/Wrapper/Unit.lua b/Moose Development/Moose/Wrapper/Unit.lua index 680dbb318..d1c2d51a1 100644 --- a/Moose Development/Moose/Wrapper/Unit.lua +++ b/Moose Development/Moose/Wrapper/Unit.lua @@ -408,6 +408,17 @@ function UNIT:GetClient() return nil end +--- [AIRPLANE] Get the NATO reporting name of a UNIT. Currently airplanes only! +--@param #UNIT self +--@return #string NatoReportingName or "Bogey" if unknown. +function UNIT:GetNatoReportingName() + + local typename = self:GetTypeName() + return UTILS.GetReportingName(typename) + +end + + --- Returns the unit's number in the group. -- The number is the same number the unit has in ME. -- It may not be changed during the mission.