commit
32b920f800
@ -228,15 +228,6 @@ function onObjectNumberTyped(hoveredObject, playerColor, number)
|
||||
-- only continue for decks or cards
|
||||
if hoveredObject.type ~= "Deck" and hoveredObject.type ~= "Card" then return end
|
||||
|
||||
-- check whether the hovered object is part of a players draw objects
|
||||
for _, color in ipairs(playermatApi.getUsedMatColors()) do
|
||||
local deckAreaObjects = playermatApi.getDeckAreaObjects(color)
|
||||
if deckAreaObjects.topCard == hoveredObject or deckAreaObjects.draw == hoveredObject then
|
||||
playermatApi.drawCardsWithReshuffle(color, number)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
-- check if this is a card with states (and then change state instead of drawing it)
|
||||
local states = hoveredObject.getStates()
|
||||
if states ~= nil and #states > 0 then
|
||||
@ -246,6 +237,15 @@ function onObjectNumberTyped(hoveredObject, playerColor, number)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
-- check whether the hovered object is part of a players draw objects
|
||||
for _, color in ipairs(playermatApi.getUsedMatColors()) do
|
||||
local deckAreaObjects = playermatApi.getDeckAreaObjects(color)
|
||||
if deckAreaObjects.topCard == hoveredObject or deckAreaObjects.draw == hoveredObject then
|
||||
playermatApi.drawCardsWithReshuffle(color, number)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- TTS event, used to redraw the playermat slot symbols after a small delay to account for the custom font loading
|
||||
|
@ -128,6 +128,8 @@ function onLoad(savedData)
|
||||
slotData = loadedData.slotData
|
||||
end
|
||||
|
||||
updateMessageColor(playerColor)
|
||||
|
||||
self.interactable = false
|
||||
|
||||
-- get object references to owned objects
|
||||
|
Loading…
Reference in New Issue
Block a user