.
This commit is contained in:
parent
d62226bafb
commit
fdee19b4db
@ -58,7 +58,7 @@ end
|
||||
local function forward()
|
||||
if turtle.forward() then
|
||||
pos = getPos()
|
||||
sleep(1)
|
||||
sleep(0.2)
|
||||
if pos["r"] == 0 then
|
||||
pos["z"] = pos["z"] + 1
|
||||
elseif pos["r"] == 1 then
|
||||
@ -73,7 +73,7 @@ local function forward()
|
||||
end
|
||||
|
||||
local function back()
|
||||
sleep(1)
|
||||
sleep(0.2)
|
||||
if turtle.back() then
|
||||
if pos["r"] == 0 then
|
||||
pos["z"] = pos["z"] - 1
|
||||
@ -89,7 +89,7 @@ local function back()
|
||||
end
|
||||
|
||||
local function up()
|
||||
sleep(1)
|
||||
sleep(0.2)
|
||||
if turtle.up() then
|
||||
pos["y"] = pos["y"] + 1
|
||||
savePos()
|
||||
@ -97,7 +97,7 @@ local function up()
|
||||
end
|
||||
|
||||
local function down()
|
||||
sleep(1)
|
||||
sleep(0.2)
|
||||
if turtle.down() then
|
||||
pos["y"] = pos["y"] - 1
|
||||
savePos()
|
||||
@ -105,7 +105,7 @@ local function down()
|
||||
end
|
||||
|
||||
local function left()
|
||||
sleep(1)
|
||||
sleep(0.2)
|
||||
if turtle.turnLeft() then
|
||||
pos["r"] = (pos["r"]-1) % 4
|
||||
savePos()
|
||||
@ -113,7 +113,7 @@ local function left()
|
||||
end
|
||||
|
||||
local function right()
|
||||
sleep(1)
|
||||
sleep(0.2)
|
||||
if turtle.turnRight() then
|
||||
pos["r"] = (pos["r"]+1) % 4
|
||||
savePos()
|
||||
|
Loading…
Reference in New Issue
Block a user