deck cutter feedback
This commit is contained in:
parent
caad1df8ea
commit
811a7ca645
@ -6,12 +6,18 @@ function onScriptingButtonDown(index, player_color)
|
||||
local player = Player[player_color]
|
||||
local object = player.getHoverObject()
|
||||
|
||||
if (not object) then return end
|
||||
if (object.tag ~= "Deck") then
|
||||
broadcastToColor("Hover over a deck to cut 3 (6) cards when pressing 1 (2).", player_color, "Orange")
|
||||
if not object then
|
||||
broadcastToColor("Hover over a deck and try again.", player_color, "Orange")
|
||||
return
|
||||
end
|
||||
if object.tag ~= "Deck" then
|
||||
broadcastToColor("Hover over a deck and try again.", player_color, "Orange")
|
||||
return
|
||||
end
|
||||
if count >= object.getQuantity() then
|
||||
broadcastToColor("Deck is too small to cut " .. count .. " cards.", player_color, "Orange")
|
||||
return
|
||||
end
|
||||
if (count >= object.getQuantity()) then return end
|
||||
|
||||
local pos = object.positionToWorld(Vector(0, 0, -3.5))
|
||||
for _ = 1, count do
|
||||
|
Loading…
x
Reference in New Issue
Block a user