Browse Source

yet more makefloor fixes

master
unknown 13 years ago
parent
commit
fa3d43ccbd
  1. 11
      makefloor

11
makefloor

@ -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