-- Should bridge to coordinates with clean road and barier... come back when there is no block anymore -- could find a way to move the player with it so the chunks are loaded function init_prompt() local x, y, z = gps.locate() term.clear() term.print("(".. x .. "/".. y.."/"..z..") is this the actual turret coordinates? (y/n)") if read() ~= "y" then error("Wrong coordinates") end term.print("Where do you want to bridge to (x y z): ") coords = read() x, y = string.find(coords, "(%-?%d+)%s(%-?%d+)") return x, y end function get_rotation() x_i, y_i, z_i = gps.locate() if not turtle.forward() then error("turtle can't go forward to get it's location. Please clear the way") end x_f, y_f, z_f = gps.locate() turtle.back() return x_f - x_i, y_f - y_i, z_f - z_i end -- NOT FINISHED function bridge_block_list(p1, p2) x1, y1 = p1.x, p1.y x2, y2 = p2.x, p2.y ret = {} slope = (y2 - y1) / (x2 - x1) y = y1 for x=x1, x2, 1 do if _ then -- TODO: Finish the algo y = y + 1 end table.insert(ret, {x,y}) end end