mtinfo/recipes.lua
BuckarooBanzay c3f1070630 export data as js-files with global storage
makes it possible to view it locally without webserver
2020-02-19 20:39:44 +01:00

11 lines
262 B
Lua

minetest.register_on_mods_loaded(function()
local data = {}
for name in pairs(minetest.registered_nodes) do
data[name] = minetest.get_all_craft_recipes(name)
end
mtinfo.export_json(mtinfo.basepath.."/data/recipes.js", data, "mtinfo.recipes")
end)