attack program - new
This commit is contained in:
@@ -63,6 +63,7 @@ function Point.iterateClosest(spt, ipts)
|
|||||||
return function()
|
return function()
|
||||||
local pt = Point.closest(spt, pts)
|
local pt = Point.closest(spt, pts)
|
||||||
if pt then
|
if pt then
|
||||||
|
Util.removeByValue(pts, pt)
|
||||||
return pt
|
return pt
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -126,7 +127,7 @@ while true do
|
|||||||
repeat
|
repeat
|
||||||
repeat until not turtle.attack()
|
repeat until not turtle.attack()
|
||||||
mob = sensor.getMetaByID(mob.id)
|
mob = sensor.getMetaByID(mob.id)
|
||||||
if not mob then
|
if not mob or Util.empty(mob) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
normalize(mob)
|
normalize(mob)
|
||||||
|
|||||||
Reference in New Issue
Block a user