spawner tweaks

This commit is contained in:
kepler155c@gmail.com
2019-01-09 06:35:08 -05:00
parent 8dcab201dc
commit 00d0c0a507

View File

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