Added CTLD MedeVac System - First public draft.

This commit is contained in:
iTracerFacer 2025-11-08 11:21:30 -06:00
parent 393da13ff3
commit b875b6eff6
5 changed files with 28 additions and 10 deletions

View File

@ -6,6 +6,10 @@
-- 4) Moose_CTLD_Pure/Moose_CTLD_FAC.lua -- optional FAC/RECCE support
-- 5) DO SCRIPT: dofile on this file OR paste the block below directly
--
-- IMPORTANT: F10 menu ordering depends on script execution order!
-- Load this initialization script BEFORE other mission scripts (TADC, CVN, Intel, etc.)
-- to ensure CTLD and FAC appear earlier in the F10 menu.
--
-- Zones you should create in the Mission Editor (as trigger zones):
-- BLUE: PICKUP_BLUE_MAIN, DROP_BLUE_1, FOB_BLUE_A
-- RED : PICKUP_RED_MAIN, DROP_RED_1, FOB_RED_A
@ -16,7 +20,6 @@
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'
@ -40,7 +43,6 @@ 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'
@ -72,7 +74,6 @@ 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' })
@ -80,7 +81,6 @@ 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' })

View File

@ -221,7 +221,8 @@ 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.
CreateMenuAtMissionStart = false, -- if true with UseGroupMenus=true, creates empty root menu at mission start to reserve F10 position (populated on player spawn)
RootMenuName = 'CTLD', -- Name for the root F10 menu. Note: Menu ordering depends on script load order in mission editor.
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
@ -1672,6 +1673,14 @@ end
-- #region Menus
function CTLD:InitMenus()
if self.Config.UseGroupMenus then
-- Create placeholder menu at mission start to reserve F10 position if requested
if self.Config.CreateMenuAtMissionStart then
-- Create a coalition-level placeholder that will be replaced by per-group menus on birth
self.PlaceholderMenu = MENU_COALITION:New(self.Side, self.Config.RootMenuName or 'CTLD')
MENU_COALITION_COMMAND:New(self.Side, 'Spawn in an aircraft to see options', self.PlaceholderMenu, function()
_msgCoalition(self.Side, 'CTLD menus will appear when you spawn in a transport aircraft.')
end)
end
self:WireBirthHandler()
-- No coalition-level root when using per-group menus; Admin/Help is nested under each group's CTLD menu
else

View File

@ -77,7 +77,8 @@ 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.
CreateMenuAtMissionStart = false, -- if true with UseGroupMenus=true, creates empty root menu at mission start to reserve F10 position
RootMenuName = 'FAC/RECCE', -- Name for the root F10 menu. Note: Menu ordering depends on script load order in mission editor.
Debug = false,
-- Visuals / marking
@ -294,6 +295,14 @@ function FAC:New(ctld, cfg)
o._schedStatus = SCHEDULER:New(nil, function() o:_checkFacStatus() end, {}, 5, 1.0)
o._schedAI = SCHEDULER:New(nil, function() o:_artyAICall() end, {}, 10, 30)
-- Create placeholder menu at mission start to reserve F10 position if requested
if o.Config.UseGroupMenus and o.Config.CreateMenuAtMissionStart then
o.PlaceholderMenu = MENU_COALITION:New(o.Side, o.Config.RootMenuName or 'FAC/RECCE')
MENU_COALITION_COMMAND:New(o.Side, 'Spawn in a FAC/RECCE aircraft to see options', o.PlaceholderMenu, function()
MESSAGE:New('FAC/RECCE menus will appear when you spawn in an appropriate aircraft.', 10):ToCoalition(o.Side)
end)
end
-- Only create coalition-level Admin/Help when not using per-group menus
if not o.Config.UseGroupMenus then
o:_ensureCoalitionMenu()

View File

@ -6,6 +6,10 @@
-- 4) Moose_CTLD_Pure/Moose_CTLD_FAC.lua -- optional FAC/RECCE support
-- 5) DO SCRIPT: dofile on this file OR paste the block below directly
--
-- IMPORTANT: F10 menu ordering depends on script execution order!
-- Load this initialization script BEFORE other mission scripts (TADC, CVN, Intel, etc.)
-- to ensure CTLD and FAC appear earlier in the F10 menu.
--
-- Zones you should create in the Mission Editor (as trigger zones):
-- BLUE: PICKUP_BLUE_MAIN, DROP_BLUE_1, FOB_BLUE_A
-- RED : PICKUP_RED_MAIN, DROP_RED_1, FOB_RED_A
@ -16,7 +20,6 @@
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'
@ -33,7 +36,6 @@ 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'
@ -57,7 +59,6 @@ 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' })
@ -65,7 +66,6 @@ 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' })