flip stop

This commit is contained in:
Chr1Z93 2024-11-21 00:30:47 +01:00
parent 225d9cbedb
commit 338da36748

View File

@ -186,6 +186,12 @@ function onObjectDrop(_, object)
end end
end end
function onObjectRotate(object, _, flip, _, _, oldFlip)
if flip ~= oldFlip then
stopTokenTransformUpdating(object)
end
end
-- Event hook for any object search. When chaos tokens are manipulated while the chaos bag -- Event hook for any object search. When chaos tokens are manipulated while the chaos bag
-- container is being searched, a TTS bug can cause tokens to duplicate or vanish. We lock the -- container is being searched, a TTS bug can cause tokens to duplicate or vanish. We lock the
-- chaos bag during search operations to avoid this. -- chaos bag during search operations to avoid this.
@ -2917,6 +2923,7 @@ function updateTokenTransform(card)
end end
function stopTokenTransformUpdating(card) function stopTokenTransformUpdating(card)
if cardTokens[card] == nil then return end
for _, tokenData in ipairs(cardTokens[card] or {}) do for _, tokenData in ipairs(cardTokens[card] or {}) do
if tokenData.token ~= nil then if tokenData.token ~= nil then
tokenData.token.locked = false tokenData.token.locked = false