|
@ -15,22 +15,24 @@ turtle.turnRight = placeholder |
|
|
turtle.detect = placeholder |
|
|
turtle.detect = placeholder |
|
|
turtle.getItemCount = placeholder |
|
|
turtle.getItemCount = placeholder |
|
|
turtle.placeDown = placeholder |
|
|
turtle.placeDown = placeholder |
|
|
|
|
|
turtle.select = placeholder |
|
|
]] |
|
|
]] |
|
|
|
|
|
|
|
|
turnedLeft = nil |
|
|
turnedLeft = nil |
|
|
if args[1] == "rightturn" or args[1] == "leftturn" then |
|
|
if args[1] == "rightturn" or args[1] == "leftturn" then |
|
|
local turnedLeft = args[1] == "rightturn" |
|
|
local turnedLeft = (args[1] == "rightturn") |
|
|
else |
|
|
else |
|
|
print("usage: \"makefloor [leftturn|rightturn] whatever the first turn may be") |
|
|
print("usage: \"makefloor [leftturn|rightturn]\" whatever the first turn may be") |
|
|
return |
|
|
return |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
local curContainer = 1 |
|
|
local curContainer = 1 |
|
|
|
|
|
turtle.select(curContainer) |
|
|
|
|
|
|
|
|
local function selectMatStack() |
|
|
local function selectMatStack() |
|
|
itemCount = turtle.getItemCount(curContainer) |
|
|
itemCount = turtle.getItemCount(curContainer) |
|
|
while itemCount == 0 do |
|
|
while itemCount == 0 do |
|
|
if curContainer == 10 then |
|
|
if curContainer == 9 then |
|
|
return false |
|
|
return false |
|
|
end |
|
|
end |
|
|
curContainer = curContainer + 1 |
|
|
curContainer = curContainer + 1 |
|
@ -68,8 +70,9 @@ local function fillblock() |
|
|
turnedLeft = not turnedLeft |
|
|
turnedLeft = not turnedLeft |
|
|
else |
|
|
else |
|
|
turtle.forward() |
|
|
turtle.forward() |
|
|
turtle.down() |
|
|
|
|
|
end |
|
|
end |
|
|
|
|
|
turtle.down() |
|
|
|
|
|
return true |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
while fillblock() do end |
|
|
while fillblock() do end |
|
|