241e79647f
A somewhat more optimized and cleaned up version of what I used to rip the node appearances for Klots. Added: - Custom dumper with more compact format support - Detecting reused tables and extracting into local vars - Actually handling the media files instead of handing a list to the user to go find via shell script - Documentation, more chatcommands
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
|