1
Fork 0

yet more makefloor fixes

This commit is contained in:
unknown 2012-04-29 21:28:18 +02:00
parent a58b78e3d0
commit fa3d43ccbd

View file

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