mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Update Designate.lua
Use of added injection of Task Name into DetectedItem; useful when using also Designate with same Detection Object to ensure menu entries are harmonized.
This commit is contained in:
parent
64b8f2fb46
commit
c71c6c5178
@ -1001,7 +1001,13 @@ do -- DESIGNATE
|
|||||||
local ID = self.Detection:GetDetectedItemID( DetectedItem )
|
local ID = self.Detection:GetDetectedItemID( DetectedItem )
|
||||||
local MenuText = ID --.. ", " .. Coord:ToStringA2G( AttackGroup )
|
local MenuText = ID --.. ", " .. Coord:ToStringA2G( AttackGroup )
|
||||||
|
|
||||||
|
-- Use injected MenuName from TaskA2GDispatcher if using same Detection Object
|
||||||
|
if DetectedItem.DesignateMenuName then
|
||||||
|
MenuText = string.format( "(%3s) %s", Designating, DetectedItem.DesignateMenuName )
|
||||||
|
else
|
||||||
MenuText = string.format( "(%3s) %s", Designating, MenuText )
|
MenuText = string.format( "(%3s) %s", Designating, MenuText )
|
||||||
|
end
|
||||||
|
|
||||||
local DetectedMenu = MENU_GROUP_DELAYED:New( AttackGroup, MenuText, MenuDesignate ):SetTime( MenuTime ):SetTag( self.DesignateName )
|
local DetectedMenu = MENU_GROUP_DELAYED:New( AttackGroup, MenuText, MenuDesignate ):SetTime( MenuTime ):SetTag( self.DesignateName )
|
||||||
|
|
||||||
-- Build the Lasing menu.
|
-- Build the Lasing menu.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user