refactor + cleanup

This commit is contained in:
kepler155c
2017-10-27 20:25:16 -04:00
parent 9939c75fc3
commit d97a9d7468
17 changed files with 261 additions and 299 deletions

View File

@@ -732,11 +732,11 @@ local s, m = turtle.run(function()
turtle.setPolicy("attack")
while not turtle.abort do
while not turtle.isAborted() do
print('fuel: ' .. turtle.getFuelLevel())
for _,task in ipairs(Util.shallowCopy(tasks)) do
--print(task.desc)
turtle.status = task.desc
turtle.setStatus(task.desc)
turtle.select(1)
if not task.fn() then
Util.filterInplace(tasks, function(v) return v.fn ~= task.fn end)