tweaks
This commit is contained in:
@@ -456,7 +456,6 @@ local function countSaplings()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function randomSapling()
|
local function randomSapling()
|
||||||
countSaplings()
|
|
||||||
local sapling = ALL_SAPLINGS[math.random(1, #ALL_SAPLINGS)]
|
local sapling = ALL_SAPLINGS[math.random(1, #ALL_SAPLINGS)]
|
||||||
|
|
||||||
if sapling.count > 0 then
|
if sapling.count > 0 then
|
||||||
@@ -507,6 +506,8 @@ local function scan(pt, filter, blocks)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function getPlantLocations(blocks)
|
local function getPlantLocations(blocks)
|
||||||
|
countSaplings()
|
||||||
|
|
||||||
Util.each(state.trees, function(sapling)
|
Util.each(state.trees, function(sapling)
|
||||||
local key = makeKey(sapling)
|
local key = makeKey(sapling)
|
||||||
local b = blocks[key]
|
local b = blocks[key]
|
||||||
@@ -642,6 +643,7 @@ local function moreTrees()
|
|||||||
|
|
||||||
setState('trees', state.trees)
|
setState('trees', state.trees)
|
||||||
|
|
||||||
|
countSaplings()
|
||||||
Point.eachClosest(turtle.point, state.trees, function(pt)
|
Point.eachClosest(turtle.point, state.trees, function(pt)
|
||||||
local sapling = randomSapling()
|
local sapling = randomSapling()
|
||||||
if sapling then
|
if sapling then
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ local page = UI.Page {
|
|||||||
y = 2, ey = -2,
|
y = 2, ey = -2,
|
||||||
sortColumn = 'name',
|
sortColumn = 'name',
|
||||||
columns = {
|
columns = {
|
||||||
{ heading = 'Count', key = 'count', width = 5 },
|
{ heading = 'Count', key = 'count', width = 5, justify = 'right' },
|
||||||
{ heading = 'Resource', key = 'displayName' },
|
{ heading = 'Resource', key = 'displayName' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -107,7 +107,7 @@ local page = UI.Page {
|
|||||||
columns = {
|
columns = {
|
||||||
{ key = 'status' },
|
{ key = 'status' },
|
||||||
{ key = 'distance', width = 4 },
|
{ key = 'distance', width = 4 },
|
||||||
{ key = 'fuel', width = 6 },
|
{ key = 'fuel', width = 5 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
accelerators = {
|
accelerators = {
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ local function createPage(node)
|
|||||||
if node.header then
|
if node.header then
|
||||||
self:centeredWrite(2, node.header, nil, colors.white)
|
self:centeredWrite(2, node.header, nil, colors.white)
|
||||||
end
|
end
|
||||||
self:write(self.width - 15, 3, 'powered by Milo', nil, colors.lightGray)
|
self:write(self.width - 15, 3, 'powered by Milo', nil, colors.gray)
|
||||||
end
|
end
|
||||||
|
|
||||||
function page.footer.info:draw()
|
function page.footer.info:draw()
|
||||||
|
|||||||
Reference in New Issue
Block a user