spawner tweaks
This commit is contained in:
@@ -57,7 +57,7 @@ local sensor = device['plethora:sensor']
|
|||||||
if not fs.exists(STARTUP_FILE) then
|
if not fs.exists(STARTUP_FILE) then
|
||||||
Util.writeFile(STARTUP_FILE,
|
Util.writeFile(STARTUP_FILE,
|
||||||
string.format([[os.sleep(1)
|
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)
|
print('Autorun program created: ' .. STARTUP_FILE)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ while true do
|
|||||||
if #mobs == 0 then
|
if #mobs == 0 then
|
||||||
os.sleep(3)
|
os.sleep(3)
|
||||||
else
|
else
|
||||||
Point.eachClosest(turtle.point, mobs, function(b)
|
for b in Point.iterateClosest(turtle.point, mobs) do
|
||||||
local strategy = getAttackStrategy(b.name)
|
local strategy = getAttackStrategy(b.name)
|
||||||
if strategy.attack(b) then
|
if strategy.attack(b) then
|
||||||
while true do
|
while true do
|
||||||
@@ -154,7 +154,7 @@ while true do
|
|||||||
end
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end)
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
dropOff()
|
dropOff()
|
||||||
|
|||||||
Reference in New Issue
Block a user