removed not-interactable objects from search results

This commit is contained in:
Chr1Z93 2024-11-21 09:35:18 +01:00
parent 6af1831d48
commit 3798e0aca6

View File

@ -6,7 +6,7 @@ do
isCardOrDeck = function(x) return x.type == "Card" or x.type == "Deck" end,
isClue = function(x) return x.memo == "clueDoom" and x.is_face_down == false end,
isDoom = function(x) return x.memo == "clueDoom" and x.is_face_down == true end,
isTileOrToken = function(x) return (x.type == "Tile" or x.type == "Generic") and x.interactable end,
isTileOrToken = function(x) return x.type == "Tile" or x.type == "Generic" end,
isUniversalToken = function(x) return x.getMemo() == "universalActionAbility" end,
}
@ -31,7 +31,7 @@ do
-- filter the result for matching objects
local objList = {}
for _, v in ipairs(searchResult) do
if not filter or filterFunc(v.hit_object) then
if (not filter or filterFunc(v.hit_object)) and v.hit_object.interactable then
table.insert(objList, v.hit_object)
end
end