Merge pull request #72 from argonui/cleanuphelper-update

Clean Up Helper: exclude "chaos bag" from cleanup
This commit is contained in:
Chr1Z 2022-11-24 23:49:11 +01:00 committed by GitHub
commit 6c5c535171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,8 +5,8 @@
-- - puts everything on playmats and hands into respective trashcans
-- - use the IGNORE_TAG to exclude objects from tidying (default: "CleanUpHelper_Ignore")
information = {
version = "2.3",
last_updated = "19.11.2022"
version = "2.4",
last_updated = "24.11.2022"
}
-- enable this for debugging
@ -27,7 +27,7 @@ local IGNORE_GUIDS = {
}
-- objects with this tag will be ignored
IGNORE_TAG = "CleanUpHelper_ignore"
local IGNORE_TAG = "CleanUpHelper_ignore"
-- colors and order for following tables
local COLORS = { "White"; "Orange"; "Green"; "Red"; "Agenda" }
@ -40,7 +40,7 @@ local TOKEN_GUIDS = {
}
-- default values (4x damage, 4x horror, 4x resources)
DEFAULT_VALUES = {
local DEFAULT_VALUES = {
0; 0; 0; 0;
0; 0; 0; 0;
5; 5; 5; 5
@ -325,9 +325,8 @@ function tidyPlayerMatCoroutine()
local desc_low = string.lower(obj.getDescription())
-- ignore these elements
if indexOf(IGNORE_GUIDS, obj.getGUID()) == nil and
obj.hasTag(IGNORE_TAG) == false and
desc_low ~= "action token" then
if indexOf(IGNORE_GUIDS, obj.getGUID()) == nil and obj.hasTag(IGNORE_TAG) == false and
desc_low ~= "chaos bag" and desc_low ~= "action token" then
coroutine.yield(0)
trashcan.putObject(obj)