updated stage draw configuration
This commit is contained in:
Binary file not shown.
@@ -8,7 +8,8 @@ function CapConfig:new()
|
|||||||
if SpearheadConfig == nil then SpearheadConfig = {} end
|
if SpearheadConfig == nil then SpearheadConfig = {} end
|
||||||
if SpearheadConfig.CapConfig == nil then SpearheadConfig.CapConfig = {} end
|
if SpearheadConfig.CapConfig == nil then SpearheadConfig.CapConfig = {} end
|
||||||
|
|
||||||
local enabled = SpearheadConfig.CapConfig.enabled or true
|
local enabled = SpearheadConfig.CapConfig.enabled
|
||||||
|
if enabled == nil then enabled = true end
|
||||||
---@return boolean
|
---@return boolean
|
||||||
o.isEnabled = function(self) return enabled == true end
|
o.isEnabled = function(self) return enabled == true end
|
||||||
|
|
||||||
|
|||||||
@@ -7,15 +7,18 @@ function StageConfig:new()
|
|||||||
if SpearheadConfig == nil then SpearheadConfig = {} end
|
if SpearheadConfig == nil then SpearheadConfig = {} end
|
||||||
if SpearheadConfig.StageConfig == nil then SpearheadConfig.StageConfig = {} end
|
if SpearheadConfig.StageConfig == nil then SpearheadConfig.StageConfig = {} end
|
||||||
|
|
||||||
local enabled = SpearheadConfig.StageConfig.enabled or true
|
local enabled = SpearheadConfig.StageConfig.enabled
|
||||||
|
if enabled == nil then enabled = true end
|
||||||
---@return boolean
|
---@return boolean
|
||||||
o.isEnabled = function(self) return enabled == true end
|
o.isEnabled = function(self) return enabled == true end
|
||||||
|
|
||||||
local drawStages = SpearheadConfig.StageConfig.drawStages or true
|
local drawStages = SpearheadConfig.StageConfig.drawStages
|
||||||
|
if drawStages == nil then drawStages = true end
|
||||||
---@return boolean
|
---@return boolean
|
||||||
o.isDrawStagesEnabled = function(self) return drawStages == true end
|
o.isDrawStagesEnabled = function(self) return drawStages == true end
|
||||||
|
|
||||||
local autoStages = SpearheadConfig.StageConfig.autoStages or true
|
local autoStages = SpearheadConfig.StageConfig.autoStages or true
|
||||||
|
if autoStages == nil then autoStages = true end
|
||||||
---@return boolean
|
---@return boolean
|
||||||
o.isAutoStages = function(self) return autoStages end
|
o.isAutoStages = function(self) return autoStages end
|
||||||
|
|
||||||
@@ -23,6 +26,16 @@ function StageConfig:new()
|
|||||||
o.getMaxMissionsPerStage = function(self) return maxMissionsPerStage end
|
o.getMaxMissionsPerStage = function(self) return maxMissionsPerStage end
|
||||||
|
|
||||||
o.logLevel = Spearhead.LoggerTemplate.LogLevelOptions.DEBUG
|
o.logLevel = Spearhead.LoggerTemplate.LogLevelOptions.DEBUG
|
||||||
|
|
||||||
|
o.toString = function()
|
||||||
|
return Spearhead.Util.toString({
|
||||||
|
maxMissionsPerStage = maxMissionsPerStage,
|
||||||
|
enabled = enabled,
|
||||||
|
drawStages = drawStages,
|
||||||
|
autoStages = autoStages
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
return o;
|
return o;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@ SpearheadConfig = {
|
|||||||
enabled = true, -- default true
|
enabled = true, -- default true
|
||||||
|
|
||||||
--Will draw the active and the next stage
|
--Will draw the active and the next stage
|
||||||
drawStages = true, -- default true
|
drawStages = false, -- default true
|
||||||
|
|
||||||
--AutoStages will continue to the next stage automatically on completion of the missions within the stage.
|
--AutoStages will continue to the next stage automatically on completion of the missions within the stage.
|
||||||
-- If you want to make it so the next stage triggers only when you want to disable it here and manually implement the actions needed.
|
-- If you want to make it so the next stage triggers only when you want to disable it here and manually implement the actions needed.
|
||||||
|
|||||||
@@ -8,11 +8,15 @@ if id == 0 then
|
|||||||
end
|
end
|
||||||
|
|
||||||
local dbLogger = Spearhead.LoggerTemplate:new("database", Spearhead.LoggerTemplate.LogLevelOptions.INFO)
|
local dbLogger = Spearhead.LoggerTemplate:new("database", Spearhead.LoggerTemplate.LogLevelOptions.INFO)
|
||||||
|
local standardLogger = Spearhead.LoggerTemplate:new("", Spearhead.LoggerTemplate.LogLevelOptions.INFO)
|
||||||
local databaseManager = Spearhead.DB:new(dbLogger, debug)
|
local databaseManager = Spearhead.DB:new(dbLogger, debug)
|
||||||
|
|
||||||
local capConfig = Spearhead.internal.configuration.CapConfig:new();
|
local capConfig = Spearhead.internal.configuration.CapConfig:new();
|
||||||
local stageConfig = Spearhead.internal.configuration.StageConfig:new();
|
local stageConfig = Spearhead.internal.configuration.StageConfig:new();
|
||||||
|
|
||||||
|
standardLogger:info("Using StageConfig: ".. stageConfig:toString())
|
||||||
|
|
||||||
|
|
||||||
Spearhead.internal.GlobalCapManager.start(databaseManager, capConfig, stageConfig)
|
Spearhead.internal.GlobalCapManager.start(databaseManager, capConfig, stageConfig)
|
||||||
Spearhead.internal.GlobalStageManager:NewAndStart(databaseManager, stageConfig)
|
Spearhead.internal.GlobalStageManager:NewAndStart(databaseManager, stageConfig)
|
||||||
Spearhead.internal.GlobalFleetManager.start(databaseManager)
|
Spearhead.internal.GlobalFleetManager.start(databaseManager)
|
||||||
|
|||||||
Reference in New Issue
Block a user