Remove "data" module in favor of "persistence"

This commit is contained in:
Lars Mueller 2021-05-13 15:46:53 +02:00
parent 54f45b3384
commit 257b9bc4d7
2 changed files with 0 additions and 20 deletions

@ -1,19 +0,0 @@
minetest.mkdir(minetest.get_worldpath().."/data")
function create_mod_storage(modname)
minetest.mkdir(minetest.get_worldpath().."/data/"..modname)
end
function get_path(modname, filename)
return minetest.get_worldpath().."/data/"..modname.."/"..filename
end
function load(modname, filename)
return minetest.deserialize(modlib.file.read(get_path(modname, filename)..".lua"))
end
function save(modname, filename, stuff)
return modlib.file.write(get_path(modname, filename)..".lua", minetest.serialize(stuff))
end
function load_json(modname, filename)
return minetest.parse_json(modlib.file.read(get_path(modname, filename)..".json") or "null")
end
function save_json(modname, filename, stuff)
return modlib.file.write(get_path(modname, filename)..".json", minetest.write_json(stuff))
end

@ -69,7 +69,6 @@ if minetest then
"schematic" "schematic"
} }
for _, file in pairs{ for _, file in pairs{
"data",
"log", "log",
"player", "player",
-- deprecated -- deprecated