Merge branch 'hotfix/data-load'
This commit is contained in:
commit
d006d88009
@ -202,7 +202,7 @@ end
|
|||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- master state variables and configuration (do not access within pings) -- {{{
|
-- master state variables and configuration (do not access within pings) -- {{{
|
||||||
do
|
if client.isHost() then
|
||||||
local defaults={
|
local defaults={
|
||||||
["armor_enabled"]=true,
|
["armor_enabled"]=true,
|
||||||
["vanilla_enabled"]=false,
|
["vanilla_enabled"]=false,
|
||||||
@ -212,6 +212,13 @@ do
|
|||||||
["aquatic_enabled"]=false
|
["aquatic_enabled"]=false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local savedData=data.loadAll()
|
||||||
|
if savedData == nil then
|
||||||
|
for k, v in pairs(defaults) do
|
||||||
|
data.save(k, v)
|
||||||
|
end
|
||||||
|
savedData=data.loadAll()
|
||||||
|
end
|
||||||
skin_state=mergeTable(
|
skin_state=mergeTable(
|
||||||
map(unstring,data.loadAll()),
|
map(unstring,data.loadAll()),
|
||||||
defaults)
|
defaults)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user