Merge branch 'hotfix/data-load' into feature/aquatic

This commit is contained in:
NullBite 2022-03-23 15:53:31 -04:00
commit f0fa8ef459
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -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,
@ -213,6 +213,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)