Skip to content

Commit

Permalink
Fixed scripting error for hotkeys to add defend isolate after game ha…
Browse files Browse the repository at this point in the history
…s started but a spirit hasn't been selected
  • Loading branch information
iakona committed Apr 1, 2021
1 parent f71c3c6 commit 7d463d6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2866,12 +2866,16 @@ function place(objName, placePos, droppingPlayerColor)
return
end
elseif objName == "Defend Token" then
if droppingPlayerColor and selectedColors[droppingPlayerColor] then
if droppingPlayerColor and selectedColors[droppingPlayerColor] and selectedColors[droppingPlayerColor].defend ~= nil then
temp = selectedColors[droppingPlayerColor].defend.takeObject({position = placePos,rotation = Vector(0,180,0)})
else
return
end
elseif objName == "Isolate Token" then
if droppingPlayerColor and selectedColors[droppingPlayerColor] then
if droppingPlayerColor and selectedColors[droppingPlayerColor] and selectedColors[droppingPlayerColor].isolate ~= nil then
temp = selectedColors[droppingPlayerColor].isolate.takeObject({position = placePos,rotation = Vector(0,180,0)})
else
return
end
elseif objName == "1 Energy" then
temp = oneEnergyBag.takeObject({position=placePos,rotation=Vector(0,180,0)})
Expand Down

0 comments on commit 7d463d6

Please sign in to comment.