started config stuff
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
---KEEP THIS LINE
|
||||
if not SpearheadConfig then SpearheadConfig = {} end
|
||||
@@ -0,0 +1,41 @@
|
||||
|
||||
|
||||
local CapConfig = {};
|
||||
function CapConfig:new()
|
||||
local o = {}
|
||||
setmetatable(o, { __index = self })
|
||||
|
||||
if SpearheadConfig == nil then SpearheadConfig = {} end
|
||||
if SpearheadConfig.CapConfig == nil then SpearheadConfig.CapConfig = {} end
|
||||
|
||||
local enabled = SpearheadConfig.CapConfig.enabled or true
|
||||
---@return boolean
|
||||
o.isEnabled = function() return enabled == true end
|
||||
|
||||
local minSpeed = tonumber(SpearheadConfig.CapConfig.minSpeed) or 400
|
||||
---@return number
|
||||
o.getMinSpeed = function() return minSpeed end
|
||||
|
||||
local maxSpeed = tonumber(SpearheadConfig.CapConfig.maxSpeed) or 400
|
||||
---@return number
|
||||
o.getMaxSpeed = function() return maxSpeed end
|
||||
|
||||
local minAlt = tonumber(SpearheadConfig.CapConfig.minAlt) or 18000
|
||||
---@return number
|
||||
o.getMinAlt = function() return minAlt end
|
||||
|
||||
local maxAlt = tonumber(SpearheadConfig.CapConfig.maxAlt) or 28000
|
||||
---@return number
|
||||
o.getMaxAlt = function() return maxAlt end
|
||||
|
||||
local rearmDelay = tonumber(SpearheadConfig.CapConfig.rearmDelay) or 600
|
||||
---@return number
|
||||
o.getRearmDelay = function() return rearmDelay end
|
||||
|
||||
local deathDelay = tonumber(SpearheadConfig.CapConfig.deathDelay) or 1800
|
||||
---@return number
|
||||
o.getDeathDelay = function() return deathDelay end
|
||||
|
||||
return o;
|
||||
end
|
||||
Spearhead.internal.configuration.CapConfig = CapConfig;
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
|
||||
SpearheadConfig = {
|
||||
|
||||
CapConfig = {
|
||||
--quickly enable of disable the entire CAP Logic
|
||||
--(you can also just rename all units to not be named "CAP_")
|
||||
enabled = true,
|
||||
|
||||
--min ground speed for CAP aircraft during patrol
|
||||
-- unit: knots
|
||||
minSpeed = 400,
|
||||
|
||||
--max speed for CAP aircraft during patrol
|
||||
-- unit: knots
|
||||
maxSpeed = 500,
|
||||
|
||||
--minAlt for aircraft on patrol
|
||||
-- unit: feet
|
||||
minAlt = 18000,
|
||||
|
||||
--maxAlt for aircraft on patrol
|
||||
-- unit: feet
|
||||
maxAlt = 28000,
|
||||
|
||||
--Delay for aircraft from touchdown to off the chocks.
|
||||
-- unit: seconds
|
||||
rearmDelay = 600,
|
||||
|
||||
--Delay for aircraft from death to takeoff.
|
||||
--When the seconds remaining is the same at the rearmDelay it will be spawned on the ramp and follow the rearm logic.
|
||||
-- !! Can not be lower than rearmDelay
|
||||
-- unit: seconds
|
||||
deathDelay = 1800,
|
||||
},
|
||||
|
||||
StageConfig = {
|
||||
-- currently no configurable options
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user