:3
This commit is contained in:
parent
491112768c
commit
68ec37f994
66 changed files with 6591 additions and 10096 deletions
85
computer/26/garbidge/dig.lua
Normal file
85
computer/26/garbidge/dig.lua
Normal file
|
@ -0,0 +1,85 @@
|
|||
width = 5
|
||||
length = 31
|
||||
MinFuelLevel = 19500
|
||||
|
||||
y = 0
|
||||
|
||||
|
||||
function layer()
|
||||
turnLeft = 1
|
||||
|
||||
function turn()
|
||||
if turnLeft == 1 then
|
||||
turtle.turnLeft()
|
||||
else
|
||||
turtle.turnRight()
|
||||
end
|
||||
end
|
||||
function digStep()
|
||||
turtle.dig()
|
||||
turtle.digUp()
|
||||
turtle.digDown()
|
||||
turtle.forward()
|
||||
end
|
||||
|
||||
for row = 1, width do
|
||||
for i = 1,length do
|
||||
digStep()
|
||||
end
|
||||
turn()
|
||||
digStep()
|
||||
turn()
|
||||
turnLeft = -turnLeft
|
||||
end
|
||||
if turnLeft == 1 then
|
||||
turtle.turnRight()
|
||||
for i = 1, width do
|
||||
turtle.forward()
|
||||
end
|
||||
turtle.turnLeft()
|
||||
else
|
||||
turtle.turnLeft()
|
||||
turtle.forward()
|
||||
turtle.turnRight()
|
||||
for i = 1, length do
|
||||
turtle.forward()
|
||||
end
|
||||
turtle.turnLeft()
|
||||
for i = 1, width do
|
||||
turtle.forward()
|
||||
end
|
||||
turtle.turnLeft()
|
||||
end
|
||||
end
|
||||
|
||||
function unload()
|
||||
for i = 1, 16 do
|
||||
turtle.select(i)
|
||||
turtle.dropUp()
|
||||
end
|
||||
turtle.turnLeft()
|
||||
turtle.turnLeft()
|
||||
while turtle.getFuelLevel() < MinFuelLevel do
|
||||
turtle.suck()
|
||||
turtle.refuel()
|
||||
end
|
||||
turtle.drop()
|
||||
turtle.turnLeft()
|
||||
turtle.turnLeft()
|
||||
|
||||
end
|
||||
|
||||
while true do
|
||||
turtle.forward()
|
||||
for i = 1, y do
|
||||
turtle.digDown()
|
||||
turtle.down()
|
||||
end
|
||||
layer()
|
||||
for i = 1, y do
|
||||
turtle.up()
|
||||
end
|
||||
turtle.back()
|
||||
unload()
|
||||
y = y + 3
|
||||
end
|
34
computer/26/garbidge/roof.lua
Normal file
34
computer/26/garbidge/roof.lua
Normal file
|
@ -0,0 +1,34 @@
|
|||
width = 5
|
||||
length = 23
|
||||
|
||||
turtle.select(1)
|
||||
|
||||
tLeft = true
|
||||
|
||||
function turn()
|
||||
if tLeft then
|
||||
turtle.turnLeft()
|
||||
else
|
||||
turtle.turnRight()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function step()
|
||||
turtle.placeUp()
|
||||
turtle.forward()
|
||||
if turtle.getItemCount() == 0 then
|
||||
turtle.select(turtle.getSelectedSlot()+1)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for row = 1, width do
|
||||
for i = 1, length do
|
||||
step()
|
||||
end
|
||||
turn()
|
||||
step()
|
||||
turn()
|
||||
tLeft = not tLeft
|
||||
end
|
32
computer/26/garbidge/tile.lua
Normal file
32
computer/26/garbidge/tile.lua
Normal file
|
@ -0,0 +1,32 @@
|
|||
tile = function()
|
||||
pf = require("pathfinding")
|
||||
function selectItem(name)
|
||||
for i = 1, 16 do
|
||||
d= turtle.getItemDetail(i)
|
||||
if d.name == name then
|
||||
turtle.select(i)
|
||||
return
|
||||
end
|
||||
end
|
||||
print("pls give me", name)
|
||||
turtle.select(16)
|
||||
print("then press enter")
|
||||
read()
|
||||
end
|
||||
|
||||
--turtle.forward()
|
||||
--turtle.turnLeft()
|
||||
--turtle.forward()
|
||||
--turtle.turnRight()
|
||||
|
||||
for x = 1, 7 do
|
||||
for z = 1, 7 do
|
||||
turtle.select(((x == 4) and (z==4) and 3) or math.mod(x+z,2)+1)
|
||||
goTo(vector.new(x,0,z))
|
||||
turtle.placeDown()
|
||||
end
|
||||
end
|
||||
goTo(vector.new(8,0,0))
|
||||
_G.pos=pos-pos
|
||||
end
|
||||
return tile
|
4
computer/26/garbidge/tilemany.lua
Normal file
4
computer/26/garbidge/tilemany.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
t = require("tile")
|
||||
for i = 1,2 do
|
||||
t()
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue