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, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"States": { "States": {
"2": { "2": {
@ -81,7 +81,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -139,7 +139,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -197,7 +197,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -255,7 +255,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -313,7 +313,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -371,7 +371,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -429,7 +429,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -487,7 +487,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,

View File

@ -38,7 +38,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"States": { "States": {
"2": { "2": {
@ -81,7 +81,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -139,7 +139,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -197,7 +197,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -255,7 +255,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -313,7 +313,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -371,7 +371,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -429,7 +429,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -487,7 +487,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,

View File

@ -38,7 +38,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"States": { "States": {
"2": { "2": {
@ -81,7 +81,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -139,7 +139,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -197,7 +197,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -255,7 +255,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -313,7 +313,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -371,7 +371,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -429,7 +429,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -487,7 +487,7 @@
"MeasureMovement": false, "MeasureMovement": false,
"Memo": "horror", "Memo": "horror",
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Horror", "Nickname": "",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,

View File

@ -686,11 +686,13 @@ 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
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
obj.getLock() == false and
obj.getDescription() ~= "Action Token" and
not tokenChecker.isChaosToken(obj) then not tokenChecker.isChaosToken(obj) then
TRASHCAN.putObject(obj) TRASHCAN.putObject(obj)
end end