From 9e54b379c8ba50228f3773a158cc5e4aa8b427a8 Mon Sep 17 00:00:00 2001 From: Muhammad Rifqi Priyo Susanto Date: Thu, 4 Feb 2016 17:24:14 +0700 Subject: [PATCH] Creative: Extend search function to descriptions --- mods/creative/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/creative/init.lua b/mods/creative/init.lua index 2bf6be15..bac75e01 100644 --- a/mods/creative/init.lua +++ b/mods/creative/init.lua @@ -67,7 +67,8 @@ function creative.update_creative_inventory(player_name, filter, tab_id) for name, def in pairs(tab_category(tab_id)) do if not (def.groups.not_in_creative_inventory == 1) and def.description and def.description ~= "" and - (not filter or def.name:find(filter, 1, true)) then + (not filter or def.name:find(filter, 1, true) or + def.description:lower():find(filter, 1, true)) then creative_list[#creative_list+1] = name end end