mirror of
https://github.com/iTracerFacer/Moose_TADC.git
synced 2026-08-22 06:45:25 +00:00
Updated coment section.
This commit is contained in:
@@ -15,14 +15,11 @@ CONFIGURATION:
|
|||||||
|
|
||||||
REQUIRES:
|
REQUIRES:
|
||||||
- MOOSE framework (for SPAWN, AIRBASE, etc.)
|
- MOOSE framework (for SPAWN, AIRBASE, etc.)
|
||||||
- Optional: MIST for deep copy of templates
|
|
||||||
|
|
||||||
═══════════════════════════════════════════════════════════════════════════════
|
═══════════════════════════════════════════════════════════════════════════════
|
||||||
]]
|
]]
|
||||||
---@diagnostic disable: undefined-global, lowercase-global
|
---@diagnostic disable: undefined-global, lowercase-global
|
||||||
-- MOOSE framework globals are defined at runtime by DCS World
|
-- MOOSE framework globals are defined at runtime by DCS World
|
||||||
|
|
||||||
|
|
||||||
-- Single-run guard to prevent duplicate dispatcher loops if script is reloaded
|
-- Single-run guard to prevent duplicate dispatcher loops if script is reloaded
|
||||||
if _G.__TDAC_DISPATCHER_RUNNING then
|
if _G.__TDAC_DISPATCHER_RUNNING then
|
||||||
env.info("[TDAC] CargoDispatcher already running; aborting duplicate load")
|
env.info("[TDAC] CargoDispatcher already running; aborting duplicate load")
|
||||||
@@ -30,6 +27,24 @@ if _G.__TDAC_DISPATCHER_RUNNING then
|
|||||||
end
|
end
|
||||||
_G.__TDAC_DISPATCHER_RUNNING = true
|
_G.__TDAC_DISPATCHER_RUNNING = true
|
||||||
|
|
||||||
|
--[[
|
||||||
|
CARGO SUPPLY CONFIGURATION
|
||||||
|
--------------------------------------------------------------------------
|
||||||
|
Set supply airfields, cargo template names, and resupply thresholds for each coalition.
|
||||||
|
]]
|
||||||
|
local CARGO_SUPPLY_CONFIG = {
|
||||||
|
red = {
|
||||||
|
supplyAirfields = { "Sochi-Adler", "Nalchik", "Beslan", "Maykop-Khanskaya" }, -- replace with your RED supply airbase names
|
||||||
|
cargoTemplate = "CARGO_RED_AN26", -- replace with your RED cargo aircraft template name
|
||||||
|
threshold = 0.90 -- ratio below which to trigger resupply (testing)
|
||||||
|
},
|
||||||
|
blue = {
|
||||||
|
supplyAirfields = { "Batumi", "Kobuleti", "Senaki-Kolkhi", "Kutaisi", "Soganlug" }, -- replace with your BLUE supply airbase names
|
||||||
|
cargoTemplate = "CARGO_BLUE_C130", -- replace with your BLUE cargo aircraft template name
|
||||||
|
threshold = 0.90 -- ratio below which to trigger resupply (testing)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
GLOBAL STATE AND CONFIGURATION
|
GLOBAL STATE AND CONFIGURATION
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
@@ -51,23 +66,7 @@ if DISPATCHER_CONFIG.ALLOW_FALLBACK_TO_INMEM_TEMPLATE == nil then
|
|||||||
DISPATCHER_CONFIG.ALLOW_FALLBACK_TO_INMEM_TEMPLATE = false
|
DISPATCHER_CONFIG.ALLOW_FALLBACK_TO_INMEM_TEMPLATE = false
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[
|
|
||||||
CARGO SUPPLY CONFIGURATION
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
Set supply airfields, cargo template names, and resupply thresholds for each coalition.
|
|
||||||
]]
|
|
||||||
local CARGO_SUPPLY_CONFIG = {
|
|
||||||
red = {
|
|
||||||
supplyAirfields = { "Sochi-Adler", "Nalchik", "Beslan", "Maykop-Khanskaya" }, -- replace with your RED supply airbase names
|
|
||||||
cargoTemplate = "CARGO_RED_AN26", -- replace with your RED cargo aircraft template name
|
|
||||||
threshold = 0.90 -- ratio below which to trigger resupply (testing)
|
|
||||||
},
|
|
||||||
blue = {
|
|
||||||
supplyAirfields = { "Batumi", "Kobuleti", "Senaki-Kolkhi", "Kutaisi", "Soganlug" }, -- replace with your BLUE supply airbase names
|
|
||||||
cargoTemplate = "CARGO_BLUE_C130", -- replace with your BLUE cargo aircraft template name
|
|
||||||
threshold = 0.90 -- ratio below which to trigger resupply (testing)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1895,9 +1895,9 @@ local function launchInterceptor(threatGroup, coalitionSide)
|
|||||||
|
|
||||||
-- Apply cooldown immediately when squadron launches
|
-- Apply cooldown immediately when squadron launches
|
||||||
local currentTime = timer.getTime()
|
local currentTime = timer.getTime()
|
||||||
|
local cooldownMinutes = 0
|
||||||
if coalitionSettings and coalitionSettings.squadronCooldown then
|
if coalitionSettings and coalitionSettings.squadronCooldown then
|
||||||
squadronCooldowns[coalitionKey][squadron.templateName] = currentTime + coalitionSettings.squadronCooldown
|
squadronCooldowns[coalitionKey][squadron.templateName] = currentTime + coalitionSettings.squadronCooldown
|
||||||
local cooldownMinutes = coalitionSettings.squadronCooldown / 60
|
|
||||||
cooldownMinutes = coalitionSettings.squadronCooldown / 60
|
cooldownMinutes = coalitionSettings.squadronCooldown / 60
|
||||||
end
|
end
|
||||||
log(coalitionName .. " Squadron " .. squadron.displayName .. " LAUNCHED! Applying " .. cooldownMinutes .. " minute cooldown")
|
log(coalitionName .. " Squadron " .. squadron.displayName .. " LAUNCHED! Applying " .. cooldownMinutes .. " minute cooldown")
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user