added Wendy Menu edge case handling
This commit is contained in:
parent
640c0dd8a2
commit
ce2a31c510
@ -268,9 +268,13 @@ end
|
|||||||
function addMenuOptions(parameters)
|
function addMenuOptions(parameters)
|
||||||
local playerColor = parameters.playerColor
|
local playerColor = parameters.playerColor
|
||||||
local hoveredObject = parameters.hoveredObject
|
local hoveredObject = parameters.hoveredObject
|
||||||
if hoveredObject == nil or hoveredObject.getVar("MENU_ADDED") == true then return end
|
if hoveredObject == nil then
|
||||||
if hoveredObject.tag ~= "Card" then
|
return
|
||||||
broadcastToColor("Right-click seal options can only be added to cards", playerColor)
|
elseif hoveredObject.type ~= "Card" then
|
||||||
|
broadcastToColor("Right-click seal options can only be added to cards.", playerColor)
|
||||||
|
return
|
||||||
|
elseif hoveredObject.hasTag("CardThatSeals") or hoveredObject.getVar("MENU_ADDED") == true then
|
||||||
|
broadcastToColor("This card already has a sealing context menu.", playerColor)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user