From 083f6488fd11ea4382c152d94e29ba33ac8e4dcc Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Mon, 30 Oct 2023 09:34:04 +0100 Subject: [PATCH 1/2] removed left-over memo checking code --- src/accessories/CleanUpHelper.ttslua | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/accessories/CleanUpHelper.ttslua b/src/accessories/CleanUpHelper.ttslua index 8fef10e5..189e3c14 100644 --- a/src/accessories/CleanUpHelper.ttslua +++ b/src/accessories/CleanUpHelper.ttslua @@ -251,7 +251,9 @@ function tidyPlayareaCoroutine() else for _, obj in ipairs(playAreaZone.getObjects()) do -- ignore these elements - if obj.hasTag(IGNORE_TAG) == false and checkMemo(obj) == false then + if obj.hasTag(IGNORE_TAG) == false + and obj.locked == false + and obj.interactable == true then coroutine.yield(0) trash.putObject(obj) end @@ -290,7 +292,8 @@ function tidyPlayerMatCoroutine() if obj.hasTag(IGNORE_TAG) == false and obj.hasTag("ActionToken") == false and obj.hasTag("chaosBag") == false - and checkMemo(obj) == false then + and obj.locked == false + and obj.interactable == true then coroutine.yield(0) trash.putObject(obj) @@ -342,14 +345,3 @@ function searchMythosArea() return objList end --- checks if the object is owned by a playermat or the mythos, returns boolean -function checkMemo(obj) - local memo = obj.getMemo() - if memo then - local decoded = JSON.decode(memo) or {} - if decoded.matColor then - return true - end - end - return false -end From 3cc70983e4ef7f312cea2a1469a5e6d5a03bb370 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Mon, 30 Oct 2023 09:42:15 +0100 Subject: [PATCH 2/2] changed action token detection --- src/accessories/CleanUpHelper.ttslua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/accessories/CleanUpHelper.ttslua b/src/accessories/CleanUpHelper.ttslua index 189e3c14..05a52741 100644 --- a/src/accessories/CleanUpHelper.ttslua +++ b/src/accessories/CleanUpHelper.ttslua @@ -290,7 +290,7 @@ function tidyPlayerMatCoroutine() for _, obj in ipairs(objList) do -- ignore these elements if obj.hasTag(IGNORE_TAG) == false - and obj.hasTag("ActionToken") == false + and obj.getDescription() ~= "Action Token" and obj.hasTag("chaosBag") == false and obj.locked == false and obj.interactable == true then @@ -298,7 +298,7 @@ function tidyPlayerMatCoroutine() trash.putObject(obj) -- flip action tokens back to ready - elseif obj.hasTag("ActionToken") == false and obj.is_face_down then + elseif obj.getDescription() == "Action Token" and obj.is_face_down then obj.flip() end end @@ -344,4 +344,3 @@ function searchMythosArea() end return objList end -