From 00d0c0a507058d658a3089661dbb1a6618757674 Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Wed, 9 Jan 2019 06:35:08 -0500 Subject: [PATCH] spawner tweaks --- farms/spawner.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/farms/spawner.lua b/farms/spawner.lua index a748d23..2e3b5dc 100644 --- a/farms/spawner.lua +++ b/farms/spawner.lua @@ -57,7 +57,7 @@ local sensor = device['plethora:sensor'] if not fs.exists(STARTUP_FILE) then Util.writeFile(STARTUP_FILE, string.format([[os.sleep(1) -shell.openForegroundTab('spawner.lua %s')]], table.concat(mobTypes, ' '))) +shell.openForegroundTab('spawner.lua %s')]], table.concat({ ... }, ' '))) print('Autorun program created: ' .. STARTUP_FILE) end @@ -139,7 +139,7 @@ while true do if #mobs == 0 then os.sleep(3) else - Point.eachClosest(turtle.point, mobs, function(b) + for b in Point.iterateClosest(turtle.point, mobs) do local strategy = getAttackStrategy(b.name) if strategy.attack(b) then while true do @@ -154,7 +154,7 @@ while true do end break end - end) + end end dropOff()