spaces->tab, equipper improvements, supertreefarm rewrite, follow improvements, sensor cleanup, milo multiple items allowed in recipes, remote canvas access

This commit is contained in:
kepler155c@gmail.com
2019-06-18 15:23:20 -04:00
parent 3b9b509429
commit 045b32884f
162 changed files with 20448 additions and 20286 deletions

View File

@@ -12,39 +12,39 @@ local t = Util.readTable(shell.resolve(fileName)) or error('Unable to read ' ..
local ni = peripheral.find('neuralInterface')
local function walkTo(x, y, z)
local pt = GPS.locate(2)
if pt then
local s, m, m2 = pcall(function()
local gpt = {
x = x - pt.x,
y = math.floor(y) - math.floor(pt.y),
z = z - pt.z,
}
gpt.x = math.min(math.max(gpt.x, -30), 30)
gpt.z = math.min(math.max(gpt.z, -30), 30)
return ni.walk(gpt.x, gpt.y, gpt.z)
end)
if not s or not m then
_G.printError(m2 or m)
end
end
os.sleep(.5)
while ni.isWalking() do
os.sleep(0)
end
local pt = GPS.locate(2)
if pt then
local s, m, m2 = pcall(function()
local gpt = {
x = x - pt.x,
y = math.floor(y) - math.floor(pt.y),
z = z - pt.z,
}
gpt.x = math.min(math.max(gpt.x, -30), 30)
gpt.z = math.min(math.max(gpt.z, -30), 30)
return ni.walk(gpt.x, gpt.y, gpt.z)
end)
if not s or not m then
_G.printError(m2 or m)
end
end
os.sleep(.5)
while ni.isWalking() do
os.sleep(0)
end
end
for _,v in pairs(t) do
Util.print(v)
Util.print(v)
--if v.action == 'walk' then
walkTo(v.x, v.y, v.z)
--end
ni.look(v.yaw, v.pitch)
if v.action == 'use' then
ni.use()
os.sleep(2)
end
--if v.action == 'walk' then
walkTo(v.x, v.y, v.z)
--end
ni.look(v.yaw, v.pitch)
if v.action == 'use' then
ni.use()
os.sleep(2)
end
-- os.sleep(v.delay)
-- os.sleep(2)
-- read()