exclude playermat owned tokens
This commit is contained in:
parent
837ba302a9
commit
c2e4fc8ca8
@ -689,11 +689,15 @@ end
|
|||||||
function removeTokensFromObject(object)
|
function removeTokensFromObject(object)
|
||||||
for _, v in ipairs(searchArea(object.getPosition(), { 3, 1, 4 })) do
|
for _, v in ipairs(searchArea(object.getPosition(), { 3, 1, 4 })) do
|
||||||
local obj = v.hit_object
|
local obj = v.hit_object
|
||||||
-- don't remove the table surface, self, any decks/cards or chaos tokens
|
local name = obj.getName()
|
||||||
if obj.getGUID() ~= "4ee1f2" and
|
|
||||||
|
if obj.getGUID() ~= "4ee1f2" and -- table
|
||||||
obj ~= self and
|
obj ~= self and
|
||||||
obj.type ~= "Deck" and
|
obj.type ~= "Deck" and
|
||||||
obj.type ~= "Card" and
|
obj.type ~= "Card" and
|
||||||
|
name ~= "Horror" and
|
||||||
|
name ~= "Resources" and
|
||||||
|
obj.getDescription() ~= "Action Token" and
|
||||||
not tokenChecker.isChaosToken(obj) then
|
not tokenChecker.isChaosToken(obj) then
|
||||||
TRASHCAN.putObject(obj)
|
TRASHCAN.putObject(obj)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user