From c2e4fc8ca812c39a25af30642b5a4772ebe72fe2 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Tue, 11 Apr 2023 22:17:29 +0200 Subject: [PATCH 1/2] exclude playermat owned tokens --- src/playermat/Playmat.ttslua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/playermat/Playmat.ttslua b/src/playermat/Playmat.ttslua index 5a14b196..a684188f 100644 --- a/src/playermat/Playmat.ttslua +++ b/src/playermat/Playmat.ttslua @@ -689,11 +689,15 @@ end function removeTokensFromObject(object) for _, v in ipairs(searchArea(object.getPosition(), { 3, 1, 4 })) do local obj = v.hit_object - -- don't remove the table surface, self, any decks/cards or chaos tokens - if obj.getGUID() ~= "4ee1f2" and + local name = obj.getName() + + if obj.getGUID() ~= "4ee1f2" and -- table obj ~= self and obj.type ~= "Deck" and obj.type ~= "Card" and + name ~= "Horror" and + name ~= "Resources" and + obj.getDescription() ~= "Action Token" and not tokenChecker.isChaosToken(obj) then TRASHCAN.putObject(obj) end From 9a8dd4aeb012793e04c6ec0df121f733fe4b1530 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Tue, 11 Apr 2023 22:37:55 +0200 Subject: [PATCH 2/2] fixed approach and updated horror token names --- objects/Horrortokens.7bd2a0/Horror.36be72.json | 18 +++++++++--------- objects/Horrortokens.ae1a4e/Horror.36be72.json | 18 +++++++++--------- objects/Horrortokens.c3ecf4/Horror.36be72.json | 18 +++++++++--------- src/playermat/Playmat.ttslua | 4 +--- 4 files changed, 28 insertions(+), 30 deletions(-) diff --git a/objects/Horrortokens.7bd2a0/Horror.36be72.json b/objects/Horrortokens.7bd2a0/Horror.36be72.json index 2d35aafe..0839a4d4 100644 --- a/objects/Horrortokens.7bd2a0/Horror.36be72.json +++ b/objects/Horrortokens.7bd2a0/Horror.36be72.json @@ -38,7 +38,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "States": { "2": { @@ -81,7 +81,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -139,7 +139,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -197,7 +197,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -255,7 +255,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -313,7 +313,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -371,7 +371,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -429,7 +429,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -487,7 +487,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, diff --git a/objects/Horrortokens.ae1a4e/Horror.36be72.json b/objects/Horrortokens.ae1a4e/Horror.36be72.json index 2d35aafe..0839a4d4 100644 --- a/objects/Horrortokens.ae1a4e/Horror.36be72.json +++ b/objects/Horrortokens.ae1a4e/Horror.36be72.json @@ -38,7 +38,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "States": { "2": { @@ -81,7 +81,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -139,7 +139,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -197,7 +197,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -255,7 +255,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -313,7 +313,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -371,7 +371,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -429,7 +429,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -487,7 +487,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, diff --git a/objects/Horrortokens.c3ecf4/Horror.36be72.json b/objects/Horrortokens.c3ecf4/Horror.36be72.json index 2d35aafe..0839a4d4 100644 --- a/objects/Horrortokens.c3ecf4/Horror.36be72.json +++ b/objects/Horrortokens.c3ecf4/Horror.36be72.json @@ -38,7 +38,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "States": { "2": { @@ -81,7 +81,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -139,7 +139,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -197,7 +197,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -255,7 +255,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -313,7 +313,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -371,7 +371,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -429,7 +429,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, @@ -487,7 +487,7 @@ "MeasureMovement": false, "Memo": "horror", "Name": "Custom_Token", - "Nickname": "Horror", + "Nickname": "", "Snap": false, "Sticky": true, "Tooltip": true, diff --git a/src/playermat/Playmat.ttslua b/src/playermat/Playmat.ttslua index a684188f..bfebb400 100644 --- a/src/playermat/Playmat.ttslua +++ b/src/playermat/Playmat.ttslua @@ -689,14 +689,12 @@ end function removeTokensFromObject(object) for _, v in ipairs(searchArea(object.getPosition(), { 3, 1, 4 })) do local obj = v.hit_object - local name = obj.getName() if obj.getGUID() ~= "4ee1f2" and -- table obj ~= self and obj.type ~= "Deck" and obj.type ~= "Card" and - name ~= "Horror" and - name ~= "Resources" and + obj.getLock() == false and obj.getDescription() ~= "Action Token" and not tokenChecker.isChaosToken(obj) then TRASHCAN.putObject(obj)