From 3798e0aca667fac788954a4fabe457f6e14c690a Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 21 Nov 2024 09:35:18 +0100 Subject: [PATCH] removed not-interactable objects from search results --- src/util/SearchLib.ttslua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/SearchLib.ttslua b/src/util/SearchLib.ttslua index 3beedadf..0e37a870 100644 --- a/src/util/SearchLib.ttslua +++ b/src/util/SearchLib.ttslua @@ -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