mtinfo/tools.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

17 lines
352 B
Lua

local tool_mapped_keys = {
"name",
"description",
"groups",
"inventory_image",
"stack_max",
"tool_capabilities",
"range"
}
minetest.register_on_mods_loaded(function()
local data = {}
mtinfo.map_list(data, minetest.registered_tools, tool_mapped_keys)
mtinfo.export_json(mtinfo.basepath.."/data/tools.js", data, "mtinfo.tools")
end)