mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 07:13:45 +01:00
Updates via shellscript
This commit is contained in:
parent
eb55eff0d2
commit
6b4feaec42
5
init.lua
5
init.lua
@ -11,9 +11,6 @@ if _VERSION then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- MT shorthands
|
-- MT shorthands
|
||||||
for k, v in pairs(minetest) do
|
|
||||||
print(k.." : "..type(v))
|
|
||||||
end
|
|
||||||
mt=minetest
|
mt=minetest
|
||||||
mt.version=minetest.get_version()
|
mt.version=minetest.get_version()
|
||||||
|
|
||||||
@ -542,7 +539,7 @@ data={
|
|||||||
return file_ext.write(data.get_path(modname, filename)..".lua", minetest.serialize(stuff))
|
return file_ext.write(data.get_path(modname, filename)..".lua", minetest.serialize(stuff))
|
||||||
end,
|
end,
|
||||||
load_json =function(modname, filename)
|
load_json =function(modname, filename)
|
||||||
return minetest.parse_json(file_ext.read(data.get_path(modname, filename)..".json"))
|
return minetest.parse_json(file_ext.read(data.get_path(modname, filename)..".json") or "null")
|
||||||
end,
|
end,
|
||||||
save_json=function(modname, filename, stuff)
|
save_json=function(modname, filename, stuff)
|
||||||
return file_ext.write(data.get_path(modname, filename)..".json", minetest.write_json(stuff))
|
return file_ext.write(data.get_path(modname, filename)..".json", minetest.write_json(stuff))
|
||||||
|
Loading…
Reference in New Issue
Block a user