Skip to content

Commit

Permalink
Creative: Extend search function to descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
srifqi authored and paramat committed Feb 6, 2016
1 parent 5994ac8 commit 9e54b37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mods/creative/init.lua
Expand Up @@ -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
Expand Down

0 comments on commit 9e54b37

Please sign in to comment.