Show non-identity digging results in craft guide
This commit is contained in:
parent
87cfad559b
commit
48d28b1e5d
15
api.lua
15
api.lua
@ -27,6 +27,21 @@ minetest.after(0.01, function()
|
||||
table.sort(unified_inventory.items_list)
|
||||
unified_inventory.items_list_size = #unified_inventory.items_list
|
||||
print("Unified Inventory. inventory size: "..unified_inventory.items_list_size)
|
||||
for _, name in ipairs(unified_inventory.items_list) do
|
||||
local def = minetest.registered_items[name]
|
||||
if type(def.drop) == "string" then
|
||||
local dstack = ItemStack(def.drop)
|
||||
if not dstack:is_empty() and dstack:get_name() ~= name then
|
||||
unified_inventory.register_craft({
|
||||
type = "digging",
|
||||
items = {name},
|
||||
output = def.drop,
|
||||
width = 0,
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user