mtinfo/items.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
346 B
Lua

local item_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_items, item_mapped_keys)
mtinfo.export_json(mtinfo.basepath.."/data/items.js", data, "mtinfo.items")
end)