add laturtle
This commit is contained in:
parent
b819508546
commit
1618991a63
28
classic_tech/laturtle.lua
Normal file
28
classic_tech/laturtle.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
-- Turtle program for industrial foregoing latex.
|
||||
-- Setup:
|
||||
-- 1. Place turtle under block to place log
|
||||
-- 2. Add unstripped logs into the first slot of the turtle
|
||||
-- 3. Add stripped logs into the second slot of the turtle
|
||||
|
||||
while true do
|
||||
local unstripped_detail = turtle.getItemDetail(1)
|
||||
local stripped_detail = turtle.getItemDetail(2)
|
||||
|
||||
if unstripped_detail == nil then
|
||||
print "Out of Logs!"
|
||||
sleep(30)
|
||||
elseif stripped_detail == nil then
|
||||
print "No stripped Log to compare against!"
|
||||
sleep(10)
|
||||
else
|
||||
turtle.select(2)
|
||||
if turtle.compareUp() then
|
||||
turtle.digUp()
|
||||
end
|
||||
|
||||
turtle.select(1)
|
||||
turtle.placeUp()
|
||||
|
||||
sleep(2)
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue