updated for LuaLS findings
This commit is contained in:
+2
-1
@@ -6,7 +6,8 @@
|
|||||||
"workspace": {
|
"workspace": {
|
||||||
"checkThirdParty": false,
|
"checkThirdParty": false,
|
||||||
"maxPreload": 1600,
|
"maxPreload": 1600,
|
||||||
"preloadFileSize": 1000
|
"preloadFileSize": 1000,
|
||||||
|
"ignoreDir": [ "config.lua" ]
|
||||||
},
|
},
|
||||||
"diagnostics": {
|
"diagnostics": {
|
||||||
"enable": true,
|
"enable": true,
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ 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
|
||||||
|
|
||||||
|
if type(SpearheadConfig.CapConfig.enabled) ~= "boolean" then
|
||||||
|
SpearheadConfig.CapConfig.enabled = true
|
||||||
|
end
|
||||||
|
|
||||||
local enabled = SpearheadConfig.CapConfig.enabled
|
local enabled = SpearheadConfig.CapConfig.enabled
|
||||||
if enabled == nil then enabled = true end
|
if enabled == nil then enabled = true end
|
||||||
self._isEnabled = enabled
|
self._isEnabled = enabled
|
||||||
|
|||||||
@@ -183,7 +183,9 @@ do
|
|||||||
local fileName = "Spearhead_Persistence.0.spearhead"
|
local fileName = "Spearhead_Persistence.0.spearhead"
|
||||||
if SpearheadConfig and SpearheadConfig.Persistence then
|
if SpearheadConfig and SpearheadConfig.Persistence then
|
||||||
if SpearheadConfig.Persistence.fileName then
|
if SpearheadConfig.Persistence.fileName then
|
||||||
|
if type(SpearheadConfig.Persistence.fileName) ~= "string" then
|
||||||
|
SpearheadConfig.Persistence.fileName = "Spearhead_Persistence.0.spearhead"
|
||||||
|
end
|
||||||
local userFileName = SpearheadConfig.Persistence.fileName
|
local userFileName = SpearheadConfig.Persistence.fileName
|
||||||
local split = Util.split_string(userFileName, ".")
|
local split = Util.split_string(userFileName, ".")
|
||||||
|
|
||||||
@@ -201,7 +203,10 @@ do
|
|||||||
fileName = table.concat(split, ".")
|
fileName = table.concat(split, ".")
|
||||||
end
|
end
|
||||||
|
|
||||||
if SpearheadConfig.Persistence.directory ~= nil then
|
if SpearheadConfig.Persistence.directory then
|
||||||
|
if type(SpearheadConfig.Persistence.directory) ~= "string" then
|
||||||
|
SpearheadConfig.Persistence.directory = lfs.writedir() .. "\\Data"
|
||||||
|
end
|
||||||
dir = SpearheadConfig.Persistence.directory
|
dir = SpearheadConfig.Persistence.directory
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user