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