Fix saving settings across restarts

This commit is contained in:
Aaron Suen 2022-04-25 22:45:34 -04:00
parent 586e592552
commit 6c3a0d1859

View File

@ -74,6 +74,7 @@ minetest.register_chatcommand(modname, {
config[p[1]] = tonumber(p[2])
end
end
modstore:set_string("config", minetest.serialize(config))
local t = {}
for k, v in pairs(defaults) do
t[#t + 1] = k .. (config[k] and "=" or "~") .. (config[k] or v)