fixed token discarding
This commit is contained in:
parent
a7dcf7c893
commit
47e491913f
@ -2929,6 +2929,15 @@ function removeTokensFromObject(params)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if cardTokens[object] then
|
||||||
|
-- check if this card was moved with tokens on it
|
||||||
|
for _, tokenData in ipairs(cardTokens[object]) do
|
||||||
|
tokenData.token.locked = false
|
||||||
|
trash.putObject(tokenData.token)
|
||||||
|
end
|
||||||
|
cardTokens[object] = nil
|
||||||
|
else
|
||||||
|
-- search area for tokens
|
||||||
for _, obj in ipairs(searchLib.onObject(object, "isTileOrToken")) do
|
for _, obj in ipairs(searchLib.onObject(object, "isTileOrToken")) do
|
||||||
if tokenChecker.isChaosToken(obj) then
|
if tokenChecker.isChaosToken(obj) then
|
||||||
returnChaosTokenToBag({ token = obj, fromBag = false })
|
returnChaosTokenToBag({ token = obj, fromBag = false })
|
||||||
@ -2940,3 +2949,4 @@ function removeTokensFromObject(params)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user