This commit is contained in:
kepler155c@gmail.com
2019-02-17 06:27:43 -05:00
parent aabfea6e19
commit 20bb3d831f
2 changed files with 9 additions and 6 deletions

View File

@@ -130,6 +130,7 @@ local function createPage(node)
{ heading = 'Size', key = 'size', width = 5 }, { heading = 'Size', key = 'size', width = 5 },
{ heading = 'Used', key = 'used', width = 5 }, { heading = 'Used', key = 'used', width = 5 },
{ heading = 'Perc', key = 'perc', width = 5 }, { heading = 'Perc', key = 'perc', width = 5 },
-- TODO: add % to each number
}, },
sortColumn = 'name', sortColumn = 'name',
}, },
@@ -335,7 +336,7 @@ Unlocked Slots : %d of %d (%d%%)
self.unlocked.value = percent self.unlocked.value = percent
self.unlockedLabel.value = string.format('Unlocked Usage: %s%% (%s of %s slots)', self.unlockedLabel.value = string.format('Unlocked Usage: %s%% (%s of %s slots)',
percent, stats.usedUnlockedSlots, stats.usedSlots) percent, stats.usedUnlockedSlots, stats.unlockedSlots)
UI.Tab.draw(self) UI.Tab.draw(self)
end end

View File

@@ -9,6 +9,8 @@ local Util = require('util')
local device = _G.device local device = _G.device
local os = _G.os local os = _G.os
local COLUMNS = 4
local gpt = GPS.getPoint() or error('GPS not found') local gpt = GPS.getPoint() or error('GPS not found')
local scanner = device.neuralInterface local scanner = device.neuralInterface
if not scanner or not scanner.scan then if not scanner or not scanner.scan then
@@ -93,8 +95,8 @@ local function hijackTurtle(remoteId)
end end
local function getNextPoint(member) local function getNextPoint(member)
local z = math.floor(chunkIndex / 3) local z = math.floor(chunkIndex / COLUMNS)
local x = chunkIndex % 3 local x = chunkIndex % COLUMNS
chunkIndex = chunkIndex + 1 chunkIndex = chunkIndex + 1
@@ -132,11 +134,12 @@ local function run(member)
local pt = getNextPoint(member) local pt = getNextPoint(member)
if pt then if pt then
turtle.gotoY(pt.y) turtle.gotoY(pt.y)
repeat while not turtle._goto(pt) do
if abort then if abort then
break break
end end
until turtle._goto(pt) os.sleep(.5)
end
for _, v in ipairs(locations) do for _, v in ipairs(locations) do
if abort then if abort then
@@ -148,7 +151,6 @@ local function run(member)
turtle.equip('right', 'minecraft:diamond_pickaxe') turtle.equip('right', 'minecraft:diamond_pickaxe')
if Util.size(found) > 0 then if Util.size(found) > 0 then
paused = true paused = true
print('found spawner')
local _, b = next(found) local _, b = next(found)
print(string.format('%s:%s:%s %s', b.x, b.y, b.z, b.name)) print(string.format('%s:%s:%s %s', b.x, b.y, b.z, b.name))
print('press r to continue') print('press r to continue')