wip
This commit is contained in:
@@ -118,7 +118,6 @@ TIP: You can click on the type to get more details
|
||||
  <u>Completion logic</u> <br/>
|
||||
  TODO: documentation: Completion logic
|
||||
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
Binary file not shown.
@@ -51,4 +51,6 @@ function CapConfig:new()
|
||||
|
||||
return o;
|
||||
end
|
||||
|
||||
if not Spearhead.internal then Spearhead.internal = {} end
|
||||
Spearhead.internal.configuration.CapConfig = CapConfig;
|
||||
@@ -9,10 +9,22 @@ function StageConfig:new()
|
||||
|
||||
local enabled = SpearheadConfig.StageConfig.enabled or true
|
||||
---@return boolean
|
||||
o.isEnabled = function() return enabled == true end
|
||||
o.isEnabled = function(self) return enabled == true end
|
||||
|
||||
local drawStages = SpearheadConfig.StageConfig.drawStages or true
|
||||
---@return boolean
|
||||
o.isDrawStagesEnabled = function(self) return drawStages == true end
|
||||
|
||||
local autoStages = SpearheadConfig.StageConfig.autoStages or true
|
||||
---@return boolean
|
||||
o.isAutoStages = function(self) return autoStages end
|
||||
|
||||
local maxMissionsPerStage = SpearheadConfig.StageConfig.maxMissionStage
|
||||
o.getMaxMissionPerStage = function(self) return maxMissionsPerStage end
|
||||
|
||||
o.logLevel = Spearhead.LoggerTemplate.LogLevelOptions.INFO
|
||||
|
||||
return o;
|
||||
end
|
||||
|
||||
if not Spearhead.internal then Spearhead.internal = {} end
|
||||
Spearhead.internal.configuration.StageConfig = StageConfig;
|
||||
@@ -883,7 +883,7 @@ do --setup route util
|
||||
local targetTypes = {
|
||||
[1] = "Fighters",
|
||||
[2] = "Multirole fighters",
|
||||
[3] = "Bombers",
|
||||
[3] = "Bombers"
|
||||
}
|
||||
|
||||
if attackHelos then
|
||||
|
||||
+11
-11
@@ -376,18 +376,18 @@ do -- DB
|
||||
loadAirbaseGroups()
|
||||
loadMiscGroupsInStages()
|
||||
|
||||
local cleanup = function () --CLean up all groups that are now managed inside zones by spearhead
|
||||
-- local cleanup = function () --CLean up all groups that are now managed inside zones by spearhead
|
||||
|
||||
local count = 0
|
||||
for name, taken in pairs(is_group_taken) do
|
||||
if taken == true then
|
||||
Spearhead.DcsUtil.DestroyGroup(name)
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
Logger:info("Destroyed " .. count .. " units that are now managed in zones by Spearhead")
|
||||
end
|
||||
cleanup()
|
||||
-- local count = 0
|
||||
-- for name, taken in pairs(is_group_taken) do
|
||||
-- if taken == true then
|
||||
-- Spearhead.DcsUtil.DestroyGroup(name)
|
||||
-- count = count + 1
|
||||
-- end
|
||||
-- end
|
||||
-- Logger:info("Destroyed " .. count .. " units that are now managed in zones by Spearhead")
|
||||
-- end
|
||||
-- cleanup()
|
||||
|
||||
--- key: zoneName value: { current, routes = [ { point1, point2 } ] }
|
||||
o.tables.capRoutesPerStageNumber = {}
|
||||
|
||||
@@ -203,7 +203,7 @@ do --init STAGE DIRECTOR
|
||||
end
|
||||
end
|
||||
|
||||
local max = self.stageConfig.maxMissionsInStage or 10
|
||||
local max = self.stageConfig:getMaxMissionPerStage() or 10
|
||||
|
||||
local availableMissionsCount = Spearhead.Util.tableLength(availableMissions)
|
||||
if activeCount < max and availableMissionsCount > 0 then
|
||||
|
||||
+4
-1
@@ -47,7 +47,10 @@ SpearheadConfig = {
|
||||
--[[
|
||||
TODO: Add manual stage transition documentation
|
||||
]]
|
||||
autoStages = true --default true
|
||||
autoStages = true, --default true
|
||||
|
||||
--Maximum missions per stage (includes all types of missions)
|
||||
maxMissionStage = 10
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user