Compare commits
10 Commits
9f24dbfd46
...
f790cc8bb3
Author | SHA1 | Date | |
---|---|---|---|
|
f790cc8bb3 | ||
|
8b807e4cf8 | ||
|
943fe836a1 | ||
|
a66b9a7299 | ||
|
cbd843311a | ||
|
8ff56a3322 | ||
|
b02d730978 | ||
|
ab3035402c | ||
|
4080daaa35 | ||
|
de81ce9dd8 |
2
API.md
2
API.md
@ -13,6 +13,7 @@ smart_inventory.register_page({
|
||||
smartfs_callback = function,
|
||||
sequence = number,
|
||||
on_button_click = function,
|
||||
is_visible_func = function,
|
||||
})
|
||||
```
|
||||
- name - unique short name, used for identification
|
||||
@ -22,6 +23,7 @@ smart_inventory.register_page({
|
||||
- smartfs_callback(state) - smartfs callback function See [smartfs documentation](https://github.com/minetest-mods/smartfs/blob/master/docs) and existing pages implementations for reference.
|
||||
- sequence - The buttons are sorted by this number (crafting=10, creative=15, player=20)
|
||||
- on_button_click(state) - function called each page button click
|
||||
- is_visible_func(state) - function for dynamic page enabelling. Should return bool value.
|
||||
|
||||
### Get the definition for registered smart_inventory page
|
||||
```smart_inventory.get_registered_page(pagename)```
|
||||
|
@ -74,3 +74,4 @@ License: [LGPL-3](https://github.com/bell07/minetest-smart_inventory/blob/master
|
||||
Textures:
|
||||
- Workbench: WTFPL (credits: to xdecor project)
|
||||
- Buttons: WTFPL (credits to Stix (Minetest-forum))
|
||||
- Arrow buttons: WTFPL (credits to daretmavi)
|
||||
|
7
init.lua
7
init.lua
@ -22,3 +22,10 @@ dofile(modpath.."/pages/creative.lua")
|
||||
dofile(modpath.."/pages/player.lua")
|
||||
dofile(modpath.."/pages/doc.lua")
|
||||
dofile(modpath.."/pages/awards.lua")
|
||||
|
||||
-- Cleanup inventories
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
local player_name = player:get_player_name()
|
||||
minetest.remove_detached_inventory(player_name.."_crafting_inv")
|
||||
minetest.remove_detached_inventory(player_name.."_trash_inv")
|
||||
end)
|
||||
|
@ -7,6 +7,13 @@ local inventory_form = smartfs.create("smart_inventory:main", function(state)
|
||||
|
||||
-- enhanced object to the main inventory functions
|
||||
state.param.invobj = maininv.get(state.location.player)
|
||||
|
||||
-- Set language code
|
||||
local player_info = minetest.get_player_information(state.location.player)
|
||||
if player_info and player_info.lang_code ~= "" then
|
||||
state.lang_code = player_info.lang_code
|
||||
end
|
||||
|
||||
-- tabbed view controller
|
||||
local tab_controller = {
|
||||
_tabs = {},
|
||||
@ -52,29 +59,31 @@ local inventory_form = smartfs.create("smart_inventory:main", function(state)
|
||||
for _, def in ipairs(smart_inventory.registered_pages) do
|
||||
assert(def.smartfs_callback, "Callback function needed")
|
||||
assert(def.name, "Name is needed")
|
||||
local tabdef = {}
|
||||
local label
|
||||
if not def.label then
|
||||
label = ""
|
||||
else
|
||||
label = def.label
|
||||
end
|
||||
tabdef.button = state:button(button_x,11.2,1,1,def.name.."_button",label)
|
||||
if def.icon then
|
||||
tabdef.button:setImage(def.icon)
|
||||
end
|
||||
tabdef.button:setTooltip(def.tooltip)
|
||||
tabdef.button:onClick(function(self)
|
||||
tab_controller:set_active(def.name)
|
||||
if def.on_button_click then
|
||||
def.on_button_click(tabdef.viewstate)
|
||||
if not def.is_visible_func or def.is_visible_func(state) then
|
||||
local tabdef = {}
|
||||
local label
|
||||
if not def.label then
|
||||
label = ""
|
||||
else
|
||||
label = def.label
|
||||
end
|
||||
end)
|
||||
tabdef.view = state:container(0,1,def.name.."_container")
|
||||
tabdef.viewstate = tabdef.view:getContainerState()
|
||||
def.smartfs_callback(tabdef.viewstate)
|
||||
tab_controller:tab_add(def.name, tabdef)
|
||||
button_x = button_x + 1
|
||||
tabdef.button = state:button(button_x,11.2,1,1,def.name.."_button",label)
|
||||
if def.icon then
|
||||
tabdef.button:setImage(def.icon)
|
||||
end
|
||||
tabdef.button:setTooltip(def.tooltip)
|
||||
tabdef.button:onClick(function(self)
|
||||
tab_controller:set_active(def.name)
|
||||
if def.on_button_click then
|
||||
def.on_button_click(tabdef.viewstate)
|
||||
end
|
||||
end)
|
||||
tabdef.view = state:container(0,1,def.name.."_container")
|
||||
tabdef.viewstate = tabdef.view:getContainerState()
|
||||
def.smartfs_callback(tabdef.viewstate)
|
||||
tab_controller:tab_add(def.name, tabdef)
|
||||
button_x = button_x + 1
|
||||
end
|
||||
end
|
||||
tab_controller:set_active(smart_inventory.registered_pages[1].name)
|
||||
end)
|
||||
|
@ -8,26 +8,7 @@ cache.citems = {}
|
||||
-----------------------------------------------------
|
||||
-- Add an Item to the cache
|
||||
-----------------------------------------------------
|
||||
function cache.add_item(def)
|
||||
|
||||
-- special handling for doors. In inventory the item should be displayed instead of the node_a/node_b
|
||||
local item_def
|
||||
|
||||
if def.groups and def.groups.door then
|
||||
if def.door then
|
||||
item_def = minetest.registered_items[def.door.name]
|
||||
elseif def.drop and type(def.drop) == "string" then
|
||||
item_def = minetest.registered_items[def.drop]
|
||||
else
|
||||
item_def = def
|
||||
end
|
||||
if not item_def then
|
||||
minetest.log("[smart_inventory] Buggy door found: "..def.name)
|
||||
item_def = def
|
||||
end
|
||||
else
|
||||
item_def = def
|
||||
end
|
||||
function cache.add_item(item_def)
|
||||
|
||||
-- already in cache. Skip duplicate processing
|
||||
if cache.citems[item_def.name] then
|
||||
@ -49,7 +30,7 @@ function cache.add_item(def)
|
||||
cache.citems[item_def.name] = entry
|
||||
-- classify the item
|
||||
for _, flt in pairs(filter.registered_filter) do
|
||||
local filter_result = flt:check_item_by_def(def)
|
||||
local filter_result = flt:check_item_by_def(item_def)
|
||||
if filter_result then
|
||||
if filter_result == true then
|
||||
cache.assign_to_group(flt.name, item_def, flt)
|
||||
|
@ -216,8 +216,17 @@ end
|
||||
filter.register_filter({
|
||||
name = "shape",
|
||||
check_item_by_def = function(self, def)
|
||||
local door_groups
|
||||
if shaped_groups["door"] then
|
||||
local door_filter = filter.get("door")
|
||||
door_groups = door_filter:check_item_by_def(def)
|
||||
if door_groups and door_groups.door then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
for k, v in pairs(def.groups) do
|
||||
if shaped_groups[k] then
|
||||
if k ~= "door" and shaped_groups[k] then
|
||||
return true
|
||||
end
|
||||
end
|
||||
@ -356,6 +365,45 @@ filter.register_filter({
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
local door_groups
|
||||
local function fill_door_groups()
|
||||
door_groups = {}
|
||||
for _, extend_def in pairs(minetest.registered_items) do
|
||||
local base_def
|
||||
if extend_def.groups and extend_def.groups.door then
|
||||
if extend_def.door then
|
||||
base_def = minetest.registered_items[extend_def.door.name]
|
||||
elseif extend_def.drop and type(extend_def.drop) == "string" then
|
||||
base_def = minetest.registered_items[extend_def.drop]
|
||||
end
|
||||
end
|
||||
if base_def then
|
||||
door_groups[base_def.name] = extend_def
|
||||
door_groups[extend_def.name] = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
filter.register_filter({
|
||||
name = "door",
|
||||
check_item_by_def = function(self, def)
|
||||
if not door_groups then
|
||||
fill_door_groups()
|
||||
end
|
||||
if not door_groups[def.name] then
|
||||
return
|
||||
end
|
||||
|
||||
local group_filter = filter.get("group")
|
||||
local ret = group_filter:check_item_by_def(door_groups[def.name])
|
||||
if ret then
|
||||
ret["not_in_creative_inventory"] = nil
|
||||
return ret
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
----------------
|
||||
return filter
|
||||
|
||||
|
@ -152,4 +152,9 @@ function maininv.get(playername)
|
||||
return self
|
||||
end
|
||||
|
||||
-- Check if player has creative privilege.
|
||||
function maininvClass:get_has_creative()
|
||||
return minetest.is_creative_enabled(self.playername)
|
||||
end
|
||||
|
||||
return maininv
|
||||
|
@ -228,14 +228,14 @@ function buttons_grid:update()
|
||||
if btnid == 1 and self.data.list_start > 1 then
|
||||
-- setup back button
|
||||
button:setVisible(true)
|
||||
button:setImage("left_arrow.png")
|
||||
button:setImage("smart_inventory_left_arrow.png")
|
||||
button:setText(tostring(self.data.list_start-1))
|
||||
button:setSize(self.data.cell_size.w, self.data.cell_size.h)
|
||||
self.data.pagesize = self.data.pagesize - 1
|
||||
elseif btnid == self.data.grid_size.w * self.data.grid_size.h and self.data.list[itemindex+1] then
|
||||
-- setup next button
|
||||
button:setVisible(true)
|
||||
button:setImage("right_arrow.png")
|
||||
button:setImage("smart_inventory_right_arrow.png")
|
||||
self.data.pagesize = self.data.pagesize - 1
|
||||
button:setText(tostring(#self.data.list-self.data.list_start-self.data.pagesize+1))
|
||||
button:setSize(self.data.cell_size.w, self.data.cell_size.h)
|
||||
|
@ -370,9 +370,10 @@ local function crafting_callback(state)
|
||||
if smart_inventory.doc_items_mod then
|
||||
self.state:get("reveal_tipp"):setPosition(11.5, 4.5)
|
||||
end
|
||||
self.state:get("search"):setPosition(12.3, 4.5)
|
||||
self.state:get("search"):setPosition(12.2, 4.5)
|
||||
self.state:get("search_bg"):setPosition(12, 4)
|
||||
self.state:get("info_tog"):setPosition(16, 4.2)
|
||||
self.state:get("search_btn"):setPosition(15.2, 4.2)
|
||||
self.state:get("info_tog"):setPosition(16.2, 4.2)
|
||||
|
||||
self.state:get("buttons_grid_Bg"):setPosition(10, 5)
|
||||
self.state:get("buttons_grid_Bg"):setSize(8, 4)
|
||||
@ -389,9 +390,10 @@ local function crafting_callback(state)
|
||||
if smart_inventory.doc_items_mod then
|
||||
self.state:get("reveal_tipp"):setPosition(11.5, 0.5)
|
||||
end
|
||||
self.state:get("search"):setPosition(12.3, 0.5)
|
||||
self.state:get("search"):setPosition(12.2, 0.5)
|
||||
self.state:get("search_bg"):setPosition(12, 0)
|
||||
self.state:get("info_tog"):setPosition(16, 0.2)
|
||||
self.state:get("search_btn"):setPosition(15.2, 0.2)
|
||||
self.state:get("info_tog"):setPosition(16.2, 0.2)
|
||||
|
||||
self.state:get("groups_sel"):setVisible(false)
|
||||
self.state:get("inf_area"):setVisible(false)
|
||||
@ -675,7 +677,7 @@ local function crafting_callback(state)
|
||||
|
||||
-- search
|
||||
state:background(12, 4, 4, 0.9, "search_bg", nil) --field background not usable
|
||||
local searchfield = state:field(12.3, 4.5, 4, 0.5, "search")
|
||||
local searchfield = state:field(12.2, 4.5, 3.4, 0.5, "search")
|
||||
searchfield:setCloseOnEnter(false)
|
||||
searchfield:onKeyEnter(function(self, state, player)
|
||||
local search_string = self:getText()
|
||||
@ -683,15 +685,21 @@ local function crafting_callback(state)
|
||||
return
|
||||
end
|
||||
|
||||
local filtered_list = ui_tools.filter_by_searchstring(ui_tools.root_list_all, search_string)
|
||||
local filtered_list = ui_tools.filter_by_searchstring(ui_tools.root_list_all, search_string, state.location.rootState.lang_code)
|
||||
filtered_list = ui_tools.filter_by_revealed(filtered_list, player)
|
||||
state.param.crafting_grouped_items = ui_tools.get_list_grouped(filtered_list)
|
||||
update_group_selection(state, true)
|
||||
ui_controller:update_list_variant("search", search_string)
|
||||
end)
|
||||
|
||||
local search_button = state:button(15.2, 4.2, 0.8, 0.5, "search_btn", "Go")
|
||||
search_button:setTooltip("Perform search action")
|
||||
search_button:onClick(function(self, state, player)
|
||||
state:get("search"):submit_key_enter("", player)
|
||||
end)
|
||||
|
||||
-- groups toggle
|
||||
local info_tog = state:toggle(16,4.2,2,0.5, "info_tog", {"Info", "Groups", "Hide"})
|
||||
local info_tog = state:toggle(16.2,4.2,1.8,0.5, "info_tog", {"Info", "Groups", "Hide"})
|
||||
info_tog:onToggle(function(self, state, player)
|
||||
local id = self:getId()
|
||||
if id == 1 then
|
||||
|
@ -1,7 +1,3 @@
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
return
|
||||
end
|
||||
|
||||
local cache = smart_inventory.cache
|
||||
local ui_tools = smart_inventory.ui_tools
|
||||
|
||||
@ -78,6 +74,7 @@ end
|
||||
-- Page layout definition
|
||||
-----------------------------------------------------
|
||||
local function creative_callback(state)
|
||||
|
||||
local player = state.location.rootState.location.player
|
||||
|
||||
-- build up UI controller
|
||||
@ -95,6 +92,7 @@ local function creative_callback(state)
|
||||
-- toggle show/hide elements
|
||||
if new_ui == 'list_small' then
|
||||
self.ui_toggle = new_ui
|
||||
self.state:get("groups_sel1"):setSize(5.6, 3)
|
||||
self.state:get("groups_sel2"):setVisible(true)
|
||||
self.state:get("groups_sel3"):setVisible(true)
|
||||
self.state:get("buttons_grid"):reset(9.55, 3.75, 9.0 , 6.5)
|
||||
@ -103,6 +101,7 @@ local function creative_callback(state)
|
||||
self.state:get("btn_tog"):setId(1)
|
||||
elseif new_ui == 'list_big' then
|
||||
self.ui_toggle = new_ui
|
||||
self.state:get("groups_sel1"):setSize(7.8, 3)
|
||||
self.state:get("groups_sel2"):setVisible(false)
|
||||
self.state:get("groups_sel3"):setVisible(false)
|
||||
self.state:get("buttons_grid"):reset(9.55, 0.25, 9.0 , 10)
|
||||
@ -155,17 +154,25 @@ local function creative_callback(state)
|
||||
end)
|
||||
|
||||
-- functions
|
||||
local searchfield = state:field(1.3, 4.1, 4.8, 0.5, "search")
|
||||
local searchfield = state:field(1.3, 4.1, 4.2, 0.5, "search")
|
||||
searchfield:setCloseOnEnter(false)
|
||||
searchfield:onKeyEnter(function(self, state, player)
|
||||
local search_string = self:getText()
|
||||
local filtered_list = ui_tools.filter_by_searchstring(ui_tools.root_list, search_string)
|
||||
local lang_code = state.location.rootState.lang_code
|
||||
local filtered_list = ui_tools.filter_by_searchstring(ui_tools.root_list, search_string, lang_code)
|
||||
state.param.creative_grouped_items = ui_tools.get_list_grouped(filtered_list)
|
||||
filtered_list = ui_tools.filter_by_searchstring(ui_tools.root_list_shape, search_string)
|
||||
filtered_list = ui_tools.filter_by_searchstring(ui_tools.root_list_shape, search_string, lang_code)
|
||||
state.param.creative_grouped_shape_items = filtered_list
|
||||
update_group_selection(state, 0)
|
||||
end)
|
||||
|
||||
local search_button = state:button(5.0, 3.8, 1, 0.5, "search_btn", "Go")
|
||||
search_button:setTooltip("Perform search action")
|
||||
search_button:onClick(function(self, state, player)
|
||||
state:get("search"):submit_key_enter("", player)
|
||||
end)
|
||||
|
||||
|
||||
-- action mode toggle
|
||||
state:toggle(6, 3.8,1.5,0.5, "btn_tog_mode", {"Give 1", "Give stack"})
|
||||
|
||||
@ -268,6 +275,10 @@ local function creative_callback(state)
|
||||
ui_controller:restore()
|
||||
end
|
||||
|
||||
local function player_has_creative(state)
|
||||
return state.param.invobj:get_has_creative()
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- Register page in smart_inventory
|
||||
-----------------------------------------------------
|
||||
@ -276,5 +287,24 @@ smart_inventory.register_page({
|
||||
tooltip = "The creative way to get items",
|
||||
icon = "smart_inventory_creative_button.png",
|
||||
smartfs_callback = creative_callback,
|
||||
is_visible_func = player_has_creative,
|
||||
sequence = 15
|
||||
})
|
||||
|
||||
-- Redefinition for sfinv method maybe called from other mods
|
||||
if minetest.global_exists("sfinv") then
|
||||
function sfinv.set_player_inventory_formspec(player, context)
|
||||
local playername = player:get_player_name()
|
||||
|
||||
local page_state = smart_inventory.get_page_state("creative", playername)
|
||||
if page_state then
|
||||
local state = page_state.location.parentState
|
||||
local has_creative = player_has_creative(state)
|
||||
state:get("creative_button"):setVisible(has_creative)
|
||||
if not has_creative then
|
||||
state:get("crafting_button"):submit(nil, playername)
|
||||
end
|
||||
state:show()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -12,9 +12,9 @@ local filter = smart_inventory.filter
|
||||
local cache = smart_inventory.cache
|
||||
local ui_tools = smart_inventory.ui_tools
|
||||
local txt = smart_inventory.txt
|
||||
local creative = minetest.setting_getbool("creative_mode")
|
||||
|
||||
local function update_grid(state, listname)
|
||||
local player_has_creative = state.param.invobj:get_has_creative()
|
||||
-- Update the users inventory grid
|
||||
local list = {}
|
||||
state.param["player_"..listname.."_list"] = list
|
||||
@ -69,7 +69,7 @@ local function update_grid(state, listname)
|
||||
end
|
||||
|
||||
-- add all usable in creative available armor to the main list
|
||||
if listname == "main" and creative == true then
|
||||
if listname == "main" and player_has_creative == true then
|
||||
if smart_inventory.armor_mod then
|
||||
for _, itemdef in pairs(cache.cgroups["armor"].items) do
|
||||
if not list_dedup[itemdef.name] and not itemdef.groups.not_in_creative_inventory then
|
||||
@ -225,6 +225,7 @@ local function update_page(state)
|
||||
end
|
||||
|
||||
local function move_item_to_armor(state, item)
|
||||
local player_has_creative = state.param.invobj:get_has_creative()
|
||||
local name = state.location.rootState.location.player
|
||||
local player = minetest.get_player_by_name(name)
|
||||
local inventory = player:get_inventory()
|
||||
@ -232,7 +233,7 @@ local function move_item_to_armor(state, item)
|
||||
|
||||
-- get item to be moved to armor inventory
|
||||
local itemstack, itemname, itemdef
|
||||
if creative == true then
|
||||
if player_has_creative == true then
|
||||
itemstack = ItemStack(item.item)
|
||||
itemname = item.item
|
||||
else
|
||||
@ -273,7 +274,7 @@ local function move_item_to_armor(state, item)
|
||||
end
|
||||
|
||||
-- handle put backs in non-creative to not lost items
|
||||
if creative == false then
|
||||
if player_has_creative == false then
|
||||
inventory:set_stack("main", item.stack_index, itemstack)
|
||||
for _, stack in ipairs(removed_items) do
|
||||
stack = inventory:add_item("main", stack)
|
||||
@ -304,7 +305,7 @@ local function move_item_to_clothing(state, item)
|
||||
clothing:set_player_clothing(player)
|
||||
state.param.player_clothing_data = clothes_ordered
|
||||
-- handle put backs in non-creative to not lost items
|
||||
if creative == false then
|
||||
if player_has_creative == false then
|
||||
local itemstack = inventory:get_stack("main", item.stack_index)
|
||||
itemstack:take_item()
|
||||
inventory:set_stack("main", item.stack_index, itemstack)
|
||||
@ -313,6 +314,7 @@ local function move_item_to_clothing(state, item)
|
||||
end
|
||||
|
||||
local function move_item_to_inv(state, item)
|
||||
local player_has_creative = state.param.invobj:get_has_creative()
|
||||
local name = state.location.rootState.location.player
|
||||
local player = minetest.get_player_by_name(name)
|
||||
local inventory = player:get_inventory()
|
||||
@ -320,7 +322,7 @@ local function move_item_to_inv(state, item)
|
||||
if cache.cgroups["armor"] and cache.cgroups["armor"].items[item.item] then
|
||||
local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"})
|
||||
local itemstack = armor_inv:get_stack("armor", item.stack_index)
|
||||
if creative == true then
|
||||
if player_has_creative == true then
|
||||
-- trash armor item in creative
|
||||
itemstack = ItemStack("")
|
||||
else
|
||||
@ -332,7 +334,7 @@ local function move_item_to_inv(state, item)
|
||||
elseif cache.cgroups["clothing"] and cache.cgroups["clothing"].items[item.item] then
|
||||
local clothes = state.param.player_clothing_data
|
||||
|
||||
if creative ~= true and clothes[item.stack_index] then
|
||||
if player_has_creative ~= true and clothes[item.stack_index] then
|
||||
local itemstack = inventory:add_item("main", ItemStack(clothes[item.stack_index]))
|
||||
if itemstack:is_empty() then
|
||||
clothes[item.stack_index] = nil
|
||||
|
BIN
textures/smart_inventory_left_arrow.png
Normal file
BIN
textures/smart_inventory_left_arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 444 B |
BIN
textures/smart_inventory_right_arrow.png
Normal file
BIN
textures/smart_inventory_right_arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 460 B |
25
ui_tools.lua
25
ui_tools.lua
@ -104,19 +104,32 @@ end
|
||||
-----------------------------------------------------
|
||||
-- Filter a list by search string
|
||||
-----------------------------------------------------
|
||||
function ui_tools.filter_by_searchstring(list, search_string)
|
||||
function ui_tools.filter_by_searchstring(list, search_string, lang_code)
|
||||
local filtered_list = {}
|
||||
search_string = search_string:lower()
|
||||
for _, entry in ipairs(list) do
|
||||
local def = minetest.registered_items[entry.item]
|
||||
if string.find(def.description:lower(), search_string) or
|
||||
string.find(def.name:lower(), search_string) then
|
||||
local description = def.description
|
||||
if lang_code then
|
||||
description = minetest.get_translated_string(lang_code, description)
|
||||
end
|
||||
if string.find(description:lower(), search_string) or
|
||||
string.find(def.name:lower(), search_string) then
|
||||
table.insert(filtered_list, entry)
|
||||
else
|
||||
for _, cgroup in pairs(entry.citem.cgroups) do
|
||||
if cgroup.keyword and string.find(cgroup.keyword:lower():gsub("_", ":"), search_string:gsub("_", ":")) then
|
||||
table.insert(filtered_list, entry)
|
||||
break
|
||||
if cgroup.keyword then
|
||||
if string.find(cgroup.keyword:lower():gsub("_", ":"), search_string:gsub("_", ":"))then
|
||||
table.insert(filtered_list, entry)
|
||||
break
|
||||
end
|
||||
end
|
||||
if cgroup.group_desc then
|
||||
local group_desc =txt[cgroup.group_desc] or cgroup.group_desc
|
||||
if string.find(group_desc:lower(), search_string)then
|
||||
table.insert(filtered_list, entry)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user