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