custom color support for clean up helper

This commit is contained in:
Chr1Z93 2023-03-10 12:07:40 +01:00
parent 38f4869ca3
commit e0f52954de

View File

@ -6,6 +6,7 @@ Cleans up the table for the next scenario in a campaign:
--]]
local tokenSpawnTrackerApi = require("core/token/TokenSpawnTrackerApi")
local playmatAPI = require("playermat/PlaymatApi")
-- enable this for debugging
local SHOW_RAYS = false
@ -296,7 +297,7 @@ function discardHands()
for i = 1, 4 do
local trashcan = getObjectFromGUID(TRASHCAN_GUIDS[i])
if trashcan == nil then return end
local hand = Player[COLORS[i]].getHandObjects()
local hand = Player[playmatAPI.getHandColor(COLORS[i])].getHandObjects()
for j = #hand, 1, -1 do
trashcan.putObject(hand[j])
end