From 86d2a11643f5f1ccf0ea3e21dcca861a198aadb7 Mon Sep 17 00:00:00 2001 From: Scott Horvath Date: Sun, 13 Jan 2019 16:28:06 -0600 Subject: [PATCH] Allow all players to view items regardless of 'creative' priv This allows any player to see usages of items found even if item does not have explicit recipies themselves. (ex: default:papyrus, found/grown in wild, can be made into paper) --- internal.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal.lua b/internal.lua index aa7ce66..0f7fa34 100644 --- a/internal.lua +++ b/internal.lua @@ -297,15 +297,13 @@ function unified_inventory.apply_filter(player, filter, search_dir) return string.find(lname, lfilter, 1, true) or string.find(ldesc, lfilter, 1, true) end end - local is_creative = unified_inventory.is_creative(player_name) unified_inventory.filtered_items_list[player_name]={} for name, def in pairs(minetest.registered_items) do if (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0) and def.description and def.description ~= "" - and ffilter(name, def) - and (is_creative or unified_inventory.crafts_for.recipe[def.name]) then + and ffilter(name, def) then table.insert(unified_inventory.filtered_items_list[player_name], name) end end