From 8b439baf30f7557a8be66249feb215c26ed5356d Mon Sep 17 00:00:00 2001 From: kepler155c Date: Fri, 23 Nov 2018 18:57:19 -0500 Subject: [PATCH] attack program - new --- farms/attack.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/farms/attack.lua b/farms/attack.lua index cfb6919..6c62ad6 100644 --- a/farms/attack.lua +++ b/farms/attack.lua @@ -63,6 +63,7 @@ function Point.iterateClosest(spt, ipts) return function() local pt = Point.closest(spt, pts) if pt then + Util.removeByValue(pts, pt) return pt end end @@ -126,7 +127,7 @@ while true do repeat repeat until not turtle.attack() mob = sensor.getMetaByID(mob.id) - if not mob then + if not mob or Util.empty(mob) then break end normalize(mob)