17 lines
451 B
Lua
17 lines
451 B
Lua
|
-- LUALOCALS < ---------------------------------------------------------
|
||
|
local minetest
|
||
|
= minetest
|
||
|
-- LUALOCALS > ---------------------------------------------------------
|
||
|
|
||
|
local modstore = minetest.get_mod_storage()
|
||
|
|
||
|
local exportdb
|
||
|
local s = modstore:get_string("export")
|
||
|
exportdb = s and s ~= "" and minetest.deserialize(s) or {}
|
||
|
|
||
|
local function savedb()
|
||
|
modstore:set_string("export", minetest.serialize(exportdb))
|
||
|
end
|
||
|
|
||
|
return exportdb, savedb
|