cap config implemented in cap groups and bases
This commit is contained in:
@@ -10,32 +10,45 @@ function CapConfig:new()
|
||||
|
||||
local enabled = SpearheadConfig.CapConfig.enabled or true
|
||||
---@return boolean
|
||||
o.isEnabled = function() return enabled == true end
|
||||
o.isEnabled = function(self) return enabled == true end
|
||||
|
||||
local minSpeed = tonumber(SpearheadConfig.CapConfig.minSpeed) or 400
|
||||
local minSpeed = (tonumber(SpearheadConfig.CapConfig.minSpeed) or 400) * 0.514444
|
||||
---@return number
|
||||
o.getMinSpeed = function() return minSpeed end
|
||||
o.getMinSpeed = function(self) return minSpeed end
|
||||
|
||||
local maxSpeed = tonumber(SpearheadConfig.CapConfig.maxSpeed) or 400
|
||||
local maxSpeed = (tonumber(SpearheadConfig.CapConfig.maxSpeed) or 400) * 0.514444
|
||||
---@return number
|
||||
o.getMaxSpeed = function() return maxSpeed end
|
||||
o.getMaxSpeed = function(self) return maxSpeed end
|
||||
|
||||
local minAlt = tonumber(SpearheadConfig.CapConfig.minAlt) or 18000
|
||||
local minAlt = (tonumber(SpearheadConfig.CapConfig.minAlt) or 18000) * 0.3048
|
||||
---@return number
|
||||
o.getMinAlt = function() return minAlt end
|
||||
o.getMinAlt = function(self) return minAlt end
|
||||
|
||||
local maxAlt = tonumber(SpearheadConfig.CapConfig.maxAlt) or 28000
|
||||
local maxAlt = (tonumber(SpearheadConfig.CapConfig.maxAlt) or 28000) * 0.3048
|
||||
---@return number
|
||||
o.getMaxAlt = function() return maxAlt end
|
||||
o.getMaxAlt = function(self) return maxAlt end
|
||||
|
||||
local minDurationOnStation = 1200
|
||||
---@return number
|
||||
o.getMinDurationOnStation = function(self) return minDurationOnStation end
|
||||
|
||||
local maxDurationOnStation = 2700
|
||||
---@return number
|
||||
o.getmaxDurationOnStation = function(self) return maxDurationOnStation end
|
||||
|
||||
local maxDeviationRange = 20 * 1852;
|
||||
---@return number
|
||||
o.getMaxDeviationRange = function(self) return maxDeviationRange end
|
||||
|
||||
local rearmDelay = tonumber(SpearheadConfig.CapConfig.rearmDelay) or 600
|
||||
---@return number
|
||||
o.getRearmDelay = function() return rearmDelay end
|
||||
o.getRearmDelay = function(self) return rearmDelay end
|
||||
|
||||
local deathDelay = tonumber(SpearheadConfig.CapConfig.deathDelay) or 1800
|
||||
---@return number
|
||||
o.getDeathDelay = function() return deathDelay end
|
||||
|
||||
o.getDeathDelay = function(self) return deathDelay end
|
||||
o.logLevel = Spearhead.LoggerTemplate.LogLevelOptions.INFO
|
||||
|
||||
return o;
|
||||
end
|
||||
Spearhead.internal.configuration.CapConfig = CapConfig;
|
||||
Reference in New Issue
Block a user