trash handling
This commit is contained in:
parent
338da36748
commit
2977e278ec
@ -2933,6 +2933,10 @@ function stopTokenTransformUpdating(card)
|
|||||||
card.use_hands = true
|
card.use_hands = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function unregisterCard(card)
|
||||||
|
cardTokens[card] = nil
|
||||||
|
end
|
||||||
|
|
||||||
function unregisterTokenFromCard(params)
|
function unregisterTokenFromCard(params)
|
||||||
local card = params.card
|
local card = params.card
|
||||||
local token = params.token
|
local token = params.token
|
||||||
|
@ -9,3 +9,17 @@ function emptyTrash()
|
|||||||
self.takeObject().destruct()
|
self.takeObject().destruct()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function onObjectLeaveContainer(container, object)
|
||||||
|
if container == self then
|
||||||
|
object.locked = false
|
||||||
|
|
||||||
|
if object.type == "Card" then
|
||||||
|
object.use_hands = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if object.type == "Card" or object.type == "Deck" then
|
||||||
|
Global.call("unregisterCard", object)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user