yet more makefloor fixes
This commit is contained in:
parent
a58b78e3d0
commit
fa3d43ccbd
1 changed files with 7 additions and 4 deletions
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
|
||||
|
|
Reference in a new issue