mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2025-06-29 15:00:32 +02:00
Categories: Improve automatic ore categorization
This function is now executed after registering all recipes within unified_inventory to properly register all item drops as ores.
This commit is contained in:
@ -115,6 +115,11 @@ function unified_inventory.set_category_index(category_name, index)
|
||||
update_category_list()
|
||||
end
|
||||
function unified_inventory.add_category_item(category_name, item)
|
||||
if type(item) ~= "string" then
|
||||
minetest.log("warning", "[unified_inventory] Cannot register category item: " .. dump(item))
|
||||
return
|
||||
end
|
||||
|
||||
ensure_category_exists(category_name)
|
||||
unified_inventory.registered_category_items[category_name][item] = true
|
||||
end
|
||||
|
Reference in New Issue
Block a user