read_manifest.lua 299 B

12345678910111213
  1. local import_mod = ...
  2. local modname = minetest.get_current_modname()
  3. local MP = minetest.get_modpath(modname)
  4. function import_mod.read_manifest()
  5. local infile = io.open(MP .. "/manifest.json", "r")
  6. local instr = infile:read("*a")
  7. infile:close()
  8. return minetest.parse_json(instr or "{}")
  9. end