Merge pull request #254 from argonui/bugfix-discard

Bugfix: exclude playermat owned tokens from discarding
This commit is contained in:
BootleggerFinn 2023-04-12 18:10:24 -05:00 committed by GitHub
commit b1c44dd595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 29 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -686,11 +686,13 @@ 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
if obj.getGUID() ~= "4ee1f2" and -- table
obj ~= self and
obj.type ~= "Deck" and
obj.type ~= "Card" and
obj.getLock() == false and
obj.getDescription() ~= "Action Token" and
not tokenChecker.isChaosToken(obj) then
TRASHCAN.putObject(obj)
end