defripper-cd2025/exportdb.lua
Aaron Suen 241e79647f Initial working version
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
2022-11-23 11:43:55 -05:00

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