Respect not_in_creative_inventory in group search

This commit is contained in:
Zefram
2014-05-01 20:44:16 +01:00
committed by RealBadAngel
parent 12ef7f6393
commit 79320c109c
2 changed files with 18 additions and 27 deletions

View File

@ -162,7 +162,7 @@ local function compute_group_representative_item(groupspec)
local groupname = string.sub(groupspec, 7)
local candidate_items = {}
for itemname, itemdef in pairs(minetest.registered_items) do
if itemdef.groups[groupname] and itemdef.groups[groupname] ~= 0 then
if (itemdef.groups.not_in_creative_inventory or 0) == 0 and (itemdef.groups[groupname] or 0) ~= 0 then
table.insert(candidate_items, itemname)
end
end