Update GameKeyHandler.ttslua
Reversed order of performDiscard's arguments
This commit is contained in:
parent
377b436feb
commit
f6bff32b14
@ -138,14 +138,14 @@ function discardObject(playerColor, hoveredObject)
|
||||
-- These should probably not be discarded normally. Ask player for confirmation.
|
||||
if (hoveredObject.type == "Deck") or hoveredObject.hasTag("Location") then
|
||||
local suspect = (hoveredObject.type == "Deck") and "Deck" or "Location"
|
||||
Player[playerColor].showConfirmDialog("Discard " .. suspect .. "?", function () performDiscard(hoveredObject, playerColor) end)
|
||||
Player[playerColor].showConfirmDialog("Discard " .. suspect .. "?", function () performDiscard(playerColor, hoveredObject) end)
|
||||
return
|
||||
end
|
||||
|
||||
performDiscard(hoveredObject, playerColor)
|
||||
performDiscard(playerColor, hoveredObject)
|
||||
end
|
||||
|
||||
function performDiscard(hoveredObject, playerColor)
|
||||
function performDiscard(playerColor, hoveredObject)
|
||||
-- initialize list of objects to discard
|
||||
local discardTheseObjects = { hoveredObject }
|
||||
|
||||
@ -174,7 +174,7 @@ function discardTopDeck(playerColor, hoveredObject)
|
||||
else
|
||||
takenCard = hoveredObject
|
||||
end
|
||||
Wait.frames(function() performDiscard(takenCard, playerColor) end, 1)
|
||||
Wait.frames(function() performDiscard(playerColor, hoveredObject) end, 1)
|
||||
end
|
||||
|
||||
-- helper function to get the player to trigger the discard function for
|
||||
|
Loading…
Reference in New Issue
Block a user