bugfix for action tokens

This commit is contained in:
Chr1Z93 2024-04-29 09:45:44 +02:00
parent 7ad53e2192
commit 8e3c0563b5

View File

@ -319,7 +319,6 @@ function tidyPlayerMatCoroutine()
and obj.hasTag("chaosBag") == false
and (obj.locked == false or obj.hasTag("Investigator"))
and obj.interactable == true then
coroutine.yield(0)
trash.putObject(obj)
-- action token handling
@ -328,18 +327,18 @@ function tidyPlayerMatCoroutine()
if obj.getScale().x < 0.4 then
local pos = playmatApi.transformLocalPosition(Vector(-0.865, 0.1, -0.28), COLORS[i])
obj.setPosition(pos)
coroutine.yield(0)
end
-- flip action tokens back to ready
if obj.is_face_down then
obj.flip()
coroutine.yield(0)
local rot = playmatApi.returnRotation(COLORS[i])
obj.setRotation(rot)
end
-- reset action token state
local stateId = obj.getStateId()
if stateId ~= -1 and stateId ~= 6 then
coroutine.yield(0)
obj.setState(6)
end
end