implemented deckLib for searchassistent
This commit is contained in:
parent
7108c2a15c
commit
5b18426063
@ -1,5 +1,6 @@
|
||||
local searchLib = require("util/SearchLib")
|
||||
local deckLib = require("util/DeckLib")
|
||||
local playmatApi = require("playermat/PlaymatApi")
|
||||
local searchLib = require("util/SearchLib")
|
||||
|
||||
-- forward declaration of variables that are used across functions
|
||||
local matColor, handColor, setAsidePosition, setAsideRotation, drawDeckPosition, topCardDetected
|
||||
@ -155,8 +156,7 @@ function endSearch(_, _, isRightClick)
|
||||
local handCards = Player[handColor].getHandObjects()
|
||||
|
||||
for i = #handCards, 1, -1 do
|
||||
handCards[i].setPosition(drawDeckPosition + Vector(0, (#handCards - i) * 0.1, 0))
|
||||
handCards[i].setRotation(setAsideRotation)
|
||||
deckLib.placeOrMergeIntoDeck(handCards[i], drawDeckPosition, setAsideRotation)
|
||||
end
|
||||
|
||||
-- draw set aside cards (from the ground!)
|
||||
@ -178,11 +178,11 @@ function endSearch(_, _, isRightClick)
|
||||
if deckAreaObjects.draw then
|
||||
deckAreaObjects.draw.shuffle()
|
||||
end
|
||||
end, #handCards * 0.1)
|
||||
end, 0.3)
|
||||
end
|
||||
|
||||
-- Norman Withers handling
|
||||
if topCardDetected then
|
||||
Wait.time(function() playmatApi.flipTopCardFromDeck(matColor) end, #handCards * 0.1)
|
||||
Wait.time(function() playmatApi.flipTopCardFromDeck(matColor) end, 0.3)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user