Remove all `not_in_creative_inventory` items from craftguide

This commit is contained in:
Niklp 2024-03-18 15:08:31 +01:00
parent b5de18b196
commit d0b482571c
No known key found for this signature in database
GPG Key ID: 05D6F5035E66267A
1 changed files with 11 additions and 1 deletions

12
api.lua
View File

@ -198,11 +198,21 @@ minetest.after(0.01, function()
]]
cat_def[itemname] = nil
end
if minetest.registered_items[itemname] and minetest.registered_items[itemname].groups.not_in_creative_inventory then
total_removed = total_removed + 1
--[[
-- For analysis
minetest.log("warning", "[unified_inventory] Removed item '"
.. itemname .. "' from category '" .. cat_name
.. "'. Reason: item is in 'not_in_creative_inventory' group")
--]]
cat_def[itemname] = nil
end
end
end
if total_removed > 0 then
minetest.log("info", "[unified_inventory] Removed " .. total_removed ..
" unknown items from the categories.")
" items from the categories.")
end
for _, callback in ipairs(ui.initialized_callbacks) do