-- oh no. this is gonna be hard -- meant for a turtle with no pickaxe local mv = require("movement") local pathfind = require("pathfind") local function moveTo(offset, x, y, z) if x and y and z then offset = offset + vector.new(x,y,z) end pathfind.followPath(offset, 40, pathfind.obstacle.stone) end local function placeDown(name, place, rotation) moveTo(place) mv.digDown() if rotation then mv.face(rotation.x, rotation.z) end mv.placeItem(name, turtle.placeDown) end local function placeDownTwice(name, place, rotation) placeDown(name, place + vector.new(1, 0, 0), rotation) placeDown(name, place + vector.new(0, 0, 0), rotation) end local function placeChestsFloor(offset) placeDownTwice("computercraft:cable", offset + vector.new(0, 0, 0)) placeDownTwice("minecraft:chiseled_stone_bricks", offset + vector.new(0, 0, 2)) placeDownTwice("computercraft:cable", offset + vector.new(0, 0, 4)) placeDownTwice("minecraft:chiseled_stone_bricks", offset + vector.new(0, 0, 6)) placeDownTwice("computercraft:cable", offset + vector.new(0, 0, 8)) end local function placeChestsLayer(offset, left, right) if right then placeDownTwice("minecraft:chest", offset + vector.new(0, 0, -1), vector.new(0,0,1)) end placeDown("computercraft:wired_modem_full", offset + vector.new(0, 0, 0)) if left then placeDownTwice("minecraft:chest", offset + vector.new(0, 0, 1), vector.new(0,0,-1)) end end local function placeChestsRoof(offset, left, right) if right then placeDownTwice("minecraft:oak_stairs", offset + vector.new(0, 0, -1), vector.new(0,0,-1)) end placeDownTwice("minecraft:oak_planks", offset + vector.new(0, 0, 0)) if left then placeDownTwice("minecraft:oak_stairs", offset + vector.new(0, 0, 1), vector.new(0,0,1)) end end local function placeChestsColumn(offset, left, right, height) for i=1,height do placeChestsLayer(offset + vector.new(0,i-1,0), left, right) end placeChestsRoof(offset + vector.new(0,height,0), left, right) end local function placeChestsColumns(offset, height) placeChestsColumn(offset + vector.new(0,0,0), true, false, height) placeChestsColumn(offset + vector.new(0,0,4), true, true, height) placeChestsColumn(offset + vector.new(0,0,8), false, true, height) end local function placeChests(offset, height, depth) for i=1,depth do placeChestsFloor(offset + vector.new((i-1)*2, -1, 0)) placeChestsColumns(offset + vector.new((i-1)*2, 0, 0), height) end end -- todo: it places chests in a way that doesn't work -- it needs to place the chest block connected to the modem last pathfind.cube(vector.new(0,0,-2), 4, 8, 9, pathfind.obstacle.stone) placeChests(vector.new(1,1,-2), 4, 2) moveTo(vector.new(0,0,0)) mv.face(1,0)