attack program - new

This commit is contained in:
kepler155c
2018-11-23 18:57:19 -05:00
parent c8f3ad3b65
commit 8b439baf30

View File

@@ -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)