bugfix for action tokens
This commit is contained in:
parent
7ad53e2192
commit
8e3c0563b5
@ -133,8 +133,8 @@ end
|
|||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
|
|
||||||
function updateCounters()
|
function updateCounters()
|
||||||
playmatApi.updateCounter("All", "ResourceCounter" , 5)
|
playmatApi.updateCounter("All", "ResourceCounter", 5)
|
||||||
playmatApi.updateCounter("All", "ClickableClueCounter" , 0)
|
playmatApi.updateCounter("All", "ClickableClueCounter", 0)
|
||||||
playmatApi.resetSkillTracker("All")
|
playmatApi.resetSkillTracker("All")
|
||||||
|
|
||||||
for i = 1, 4 do
|
for i = 1, 4 do
|
||||||
@ -196,7 +196,7 @@ function loadTrauma()
|
|||||||
if i < 5 then
|
if i < 5 then
|
||||||
RESET_VALUES.Damage[i] = trauma[i]
|
RESET_VALUES.Damage[i] = trauma[i]
|
||||||
else
|
else
|
||||||
RESET_VALUES.Horror[i-4] = trauma[i]
|
RESET_VALUES.Horror[i - 4] = trauma[i]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
loadingFailedBefore = false
|
loadingFailedBefore = false
|
||||||
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user