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.
|
-- These should probably not be discarded normally. Ask player for confirmation.
|
||||||
if (hoveredObject.type == "Deck") or hoveredObject.hasTag("Location") then
|
if (hoveredObject.type == "Deck") or hoveredObject.hasTag("Location") then
|
||||||
local suspect = (hoveredObject.type == "Deck") and "Deck" or "Location"
|
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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
performDiscard(hoveredObject, playerColor)
|
performDiscard(playerColor, hoveredObject)
|
||||||
end
|
end
|
||||||
|
|
||||||
function performDiscard(hoveredObject, playerColor)
|
function performDiscard(playerColor, hoveredObject)
|
||||||
-- initialize list of objects to discard
|
-- initialize list of objects to discard
|
||||||
local discardTheseObjects = { hoveredObject }
|
local discardTheseObjects = { hoveredObject }
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ function discardTopDeck(playerColor, hoveredObject)
|
|||||||
else
|
else
|
||||||
takenCard = hoveredObject
|
takenCard = hoveredObject
|
||||||
end
|
end
|
||||||
Wait.frames(function() performDiscard(takenCard, playerColor) end, 1)
|
Wait.frames(function() performDiscard(playerColor, hoveredObject) end, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- helper function to get the player to trigger the discard function for
|
-- helper function to get the player to trigger the discard function for
|
||||||
|
Loading…
x
Reference in New Issue
Block a user