Remove all `not_in_creative_inventory` items from craftguide
This commit is contained in:
parent
b5de18b196
commit
d0b482571c
12
api.lua
12
api.lua
|
@ -198,11 +198,21 @@ minetest.after(0.01, function()
|
||||||
]]
|
]]
|
||||||
cat_def[itemname] = nil
|
cat_def[itemname] = nil
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
if total_removed > 0 then
|
if total_removed > 0 then
|
||||||
minetest.log("info", "[unified_inventory] Removed " .. total_removed ..
|
minetest.log("info", "[unified_inventory] Removed " .. total_removed ..
|
||||||
" unknown items from the categories.")
|
" items from the categories.")
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, callback in ipairs(ui.initialized_callbacks) do
|
for _, callback in ipairs(ui.initialized_callbacks) do
|
||||||
|
|
Loading…
Reference in New Issue