finder
This commit is contained in:
@@ -23,6 +23,8 @@ local blocks = Util.transpose({
|
|||||||
})
|
})
|
||||||
local locations = { }
|
local locations = { }
|
||||||
|
|
||||||
|
gpt.x = gpt.x + 1
|
||||||
|
|
||||||
local function getLocations()
|
local function getLocations()
|
||||||
local y = gpt.y - 8
|
local y = gpt.y - 8
|
||||||
while y > 5 do
|
while y > 5 do
|
||||||
@@ -35,9 +37,6 @@ local function getLocations()
|
|||||||
end
|
end
|
||||||
|
|
||||||
getLocations()
|
getLocations()
|
||||||
for _, v in pairs(locations) do
|
|
||||||
print(v)
|
|
||||||
end
|
|
||||||
|
|
||||||
for _, b in pairs(scanner.scan()) do
|
for _, b in pairs(scanner.scan()) do
|
||||||
if b.name == 'computercraft:turtle_advanced' or
|
if b.name == 'computercraft:turtle_advanced' or
|
||||||
@@ -152,7 +151,7 @@ local function run(member)
|
|||||||
print(string.format('%s:%s:%s', b.x, b.y, b.z))
|
print(string.format('%s:%s:%s', b.x, b.y, b.z))
|
||||||
print('press r to continue')
|
print('press r to continue')
|
||||||
for _ = 1, 3 do
|
for _ = 1, 3 do
|
||||||
Sound.play('entity.bobber.throw')
|
Sound.play('block.note.pling')
|
||||||
os.sleep(.3)
|
os.sleep(.3)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -165,6 +164,9 @@ local function run(member)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
until abort
|
until abort
|
||||||
|
|
||||||
|
turtle.gotoY(gpt.y + member.index)
|
||||||
|
turtle._goto({ x = gpt.x, y = gpt.y + member.index, z = gpt.z })
|
||||||
end
|
end
|
||||||
|
|
||||||
repeat until turtle.gotoY(gpt.y)
|
repeat until turtle.gotoY(gpt.y)
|
||||||
@@ -192,6 +194,7 @@ Event.on('char', function(_, k)
|
|||||||
print('Resuming')
|
print('Resuming')
|
||||||
paused = false
|
paused = false
|
||||||
elseif k == 'a' then
|
elseif k == 'a' then
|
||||||
|
gpt = GPS.getPoint()
|
||||||
print('Aborting')
|
print('Aborting')
|
||||||
abort = true
|
abort = true
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user