moved "placeCard" into API

This commit is contained in:
Chr1Z93 2023-06-15 23:18:17 +02:00
parent e564a1f1fe
commit 4fb8b3786e
2 changed files with 10 additions and 4 deletions

View File

@ -44,10 +44,8 @@ function addDoomToAgenda()
end
-- moves the hovered card to the victory display
function moveCardToVictoryDisplay(playerColor, hoveredObject)
-- check if the provided object is a card
if hoveredObject == nil or hoveredObject.tag ~= "Card" then return end
getObjectFromGUID("6ccd6d").call("placeCard", hoveredObject)
function moveCardToVictoryDisplay(_, hoveredObject)
victoryDisplayApi.placeCard(hoveredObject)
end
-- takes a clue from a location, player needs to hover the clue directly or the location

View File

@ -8,5 +8,13 @@ do
getObjectFromGUID(VD_GUID).call("startUpdate", delay)
end
-- moves a card to the victory display (in the first empty spot)
---@param object Object Object that should be checked and potentially moved
VictoryDisplayApi.placeCard = function(object)
if object ~= nil and object.tag == "Card" then
getObjectFromGUID(VD_GUID).call("placeCard", object)
end
end
return VictoryDisplayApi
end