mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-05 23:33:51 +01:00
Creative: Extend search function to descriptions
This commit is contained in:
parent
5994ac8dc5
commit
9e54b379c8
@ -67,7 +67,8 @@ function creative.update_creative_inventory(player_name, filter, tab_id)
|
|||||||
for name, def in pairs(tab_category(tab_id)) do
|
for name, def in pairs(tab_category(tab_id)) do
|
||||||
if not (def.groups.not_in_creative_inventory == 1) and
|
if not (def.groups.not_in_creative_inventory == 1) and
|
||||||
def.description and def.description ~= "" 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
|
creative_list[#creative_list+1] = name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user