mirror of
https://github.com/iTracerFacer/DCS_MissionDev.git
synced 2025-12-03 04:14:46 +00:00
CTLD Red: Added RootMenuName = '1-CTLD' - ensures CTLD is always F1
FAC Blue: Added RootMenuName = '2-FAC/RECCE' - ensures FAC is always F2
This commit is contained in:
parent
be75543c12
commit
393da13ff3
@ -16,6 +16,7 @@
|
||||
if _MOOSE_CTLD and _G.BASE then
|
||||
ctldBlue = _MOOSE_CTLD:New({
|
||||
CoalitionSide = coalition.side.BLUE,
|
||||
RootMenuName = '1-CTLD', -- Menu name with numeric prefix to control F10 ordering (1=first, 2=second, etc.)
|
||||
PickupZoneSmokeColor = trigger.smokeColor.Blue,
|
||||
AllowedAircraft = { -- transport-capable unit type names (case-sensitive as in DCS DB)
|
||||
'UH-1H','Mi-8MTV2','Mi-24P','SA342M','SA342L','SA342Minigun','UH-60L','CH-47Fbl1','CH-47F','Mi-17','GazelleAI'
|
||||
@ -39,6 +40,7 @@ ctldBlue = _MOOSE_CTLD:New({
|
||||
|
||||
ctldRed = _MOOSE_CTLD:New({
|
||||
CoalitionSide = coalition.side.RED,
|
||||
RootMenuName = '1-CTLD', -- Menu name with numeric prefix to control F10 ordering (1=first, 2=second, etc.)
|
||||
PickupZoneSmokeColor = trigger.smokeColor.Red,
|
||||
AllowedAircraft = { -- transport-capable unit type names (case-sensitive as in DCS DB)
|
||||
'UH-1H','Mi-8MTV2','Mi-24P','SA342M','SA342L','SA342Minigun','UH-60L','CH-47Fbl1','CH-47F','Mi-17','GazelleAI'
|
||||
@ -70,6 +72,7 @@ end
|
||||
if _MOOSE_CTLD_FAC and _G.BASE and ctldBlue and ctldRed then
|
||||
facBlue = _MOOSE_CTLD_FAC:New(ctldBlue, {
|
||||
CoalitionSide = coalition.side.BLUE,
|
||||
RootMenuName = '2-FAC/RECCE', -- Menu name with numeric prefix to control F10 ordering (CTLD=1, FAC=2)
|
||||
Arty = { Enabled = false },
|
||||
})
|
||||
-- facBlue:AddRecceZone({ name = 'RECCE_BLUE_1' })
|
||||
@ -77,6 +80,7 @@ if _MOOSE_CTLD_FAC and _G.BASE and ctldBlue and ctldRed then
|
||||
|
||||
facRed = _MOOSE_CTLD_FAC:New(ctldRed, {
|
||||
CoalitionSide = coalition.side.RED,
|
||||
RootMenuName = '2-FAC/RECCE', -- Menu name with numeric prefix to control F10 ordering (CTLD=1, FAC=2)
|
||||
Arty = { Enabled = false },
|
||||
})
|
||||
-- facRed:AddRecceZone({ name = 'RECCE_RED_1' })
|
||||
|
||||
@ -221,6 +221,7 @@ CTLD.Config = {
|
||||
},
|
||||
|
||||
UseGroupMenus = true, -- if true, F10 menus per player group; otherwise coalition-wide
|
||||
RootMenuName = '1-CTLD', -- Name for the root F10 menu. Use numeric prefix (1-, 2-, etc.) to control menu ordering. CTLD=1, FAC=2 recommended.
|
||||
UseCategorySubmenus = true, -- if true, organize crate requests by category submenu (menuCategory)
|
||||
UseBuiltinCatalog = false, -- if false, starts with an empty catalog; intended when you preload a global catalog and want only that
|
||||
-- Safety offsets to avoid spawning units too close to player aircraft
|
||||
@ -1674,7 +1675,7 @@ function CTLD:InitMenus()
|
||||
self:WireBirthHandler()
|
||||
-- No coalition-level root when using per-group menus; Admin/Help is nested under each group's CTLD menu
|
||||
else
|
||||
self.MenuRoot = MENU_COALITION:New(self.Side, 'CTLD')
|
||||
self.MenuRoot = MENU_COALITION:New(self.Side, self.Config.RootMenuName or 'CTLD')
|
||||
self:BuildCoalitionMenus(self.MenuRoot)
|
||||
self:InitCoalitionAdminMenu()
|
||||
end
|
||||
@ -1701,7 +1702,7 @@ function CTLD:WireBirthHandler()
|
||||
end
|
||||
|
||||
function CTLD:BuildGroupMenus(group)
|
||||
local root = MENU_GROUP:New(group, 'CTLD')
|
||||
local root = MENU_GROUP:New(group, self.Config.RootMenuName or 'CTLD')
|
||||
-- Safe menu command helper: wraps callbacks to prevent silent errors
|
||||
local function CMD(title, parent, cb)
|
||||
return MENU_GROUP_COMMAND:New(group, title, parent, function()
|
||||
|
||||
@ -77,6 +77,7 @@ end
|
||||
FAC.Config = {
|
||||
CoalitionSide = coalition.side.BLUE,
|
||||
UseGroupMenus = true,
|
||||
RootMenuName = '2-FAC/RECCE', -- Name for the root F10 menu. Use numeric prefix (1-, 2-, etc.) to control menu ordering. CTLD=1, FAC=2 recommended.
|
||||
Debug = false,
|
||||
|
||||
-- Visuals / marking
|
||||
@ -474,7 +475,7 @@ end
|
||||
|
||||
function FAC:_buildGroupMenus(group)
|
||||
-- Build the entire FAC/RECCE menu tree for a MOOSE GROUP
|
||||
local root = MENU_GROUP:New(group, 'FAC/RECCE')
|
||||
local root = MENU_GROUP:New(group, self.Config.RootMenuName or 'FAC/RECCE')
|
||||
-- Safe menu command helper: wraps callbacks to avoid silent errors and report to group
|
||||
local function CMD(title, parent, cb)
|
||||
return MENU_GROUP_COMMAND:New(group, title, parent, function()
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
if _MOOSE_CTLD and _G.BASE then
|
||||
ctldBlue = _MOOSE_CTLD:New({
|
||||
CoalitionSide = coalition.side.BLUE,
|
||||
RootMenuName = '1-CTLD', -- Menu name with numeric prefix to control F10 ordering (1=first, 2=second, etc.)
|
||||
PickupZoneSmokeColor = trigger.smokeColor.Blue,
|
||||
AllowedAircraft = { -- transport-capable unit type names (case-sensitive as in DCS DB)
|
||||
'UH-1H','Mi-8MTV2','Mi-24P','SA342M','SA342L','SA342Minigun','UH-60L','CH-47Fbl1','CH-47F','Mi-17','GazelleAI'
|
||||
@ -32,6 +33,7 @@ ctldBlue = _MOOSE_CTLD:New({
|
||||
|
||||
ctldRed = _MOOSE_CTLD:New({
|
||||
CoalitionSide = coalition.side.RED,
|
||||
RootMenuName = '1-CTLD', -- Menu name with numeric prefix to control F10 ordering (1=first, 2=second, etc.)
|
||||
PickupZoneSmokeColor = trigger.smokeColor.Red,
|
||||
AllowedAircraft = { -- transport-capable unit type names (case-sensitive as in DCS DB)
|
||||
'UH-1H','Mi-8MTV2','Mi-24P','SA342M','SA342L','SA342Minigun','UH-60L','CH-47Fbl1','CH-47F','Mi-17','GazelleAI'
|
||||
@ -55,6 +57,7 @@ end
|
||||
if _MOOSE_CTLD_FAC and _G.BASE and ctldBlue and ctldRed then
|
||||
facBlue = _MOOSE_CTLD_FAC:New(ctldBlue, {
|
||||
CoalitionSide = coalition.side.BLUE,
|
||||
RootMenuName = '2-FAC/RECCE', -- Menu name with numeric prefix to control F10 ordering (CTLD=1, FAC=2)
|
||||
Arty = { Enabled = false },
|
||||
})
|
||||
-- facBlue:AddRecceZone({ name = 'RECCE_BLUE_1' })
|
||||
@ -62,6 +65,7 @@ if _MOOSE_CTLD_FAC and _G.BASE and ctldBlue and ctldRed then
|
||||
|
||||
facRed = _MOOSE_CTLD_FAC:New(ctldRed, {
|
||||
CoalitionSide = coalition.side.RED,
|
||||
RootMenuName = '2-FAC/RECCE', -- Menu name with numeric prefix to control F10 ordering (CTLD=1, FAC=2)
|
||||
Arty = { Enabled = false },
|
||||
})
|
||||
-- facRed:AddRecceZone({ name = 'RECCE_RED_1' })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user