milo status panel + system tabs
This commit is contained in:
@@ -229,6 +229,7 @@ local function createPage(node)
|
|||||||
|
|
||||||
function stateTab:disable()
|
function stateTab:disable()
|
||||||
Event.off(self.handle)
|
Event.off(self.handle)
|
||||||
|
UI.Tab.disable(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
function usageTab:refresh()
|
function usageTab:refresh()
|
||||||
@@ -247,6 +248,7 @@ local function createPage(node)
|
|||||||
|
|
||||||
function usageTab:disable()
|
function usageTab:disable()
|
||||||
Event.off(self.handle)
|
Event.off(self.handle)
|
||||||
|
UI.Tab.disable(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
function usageTab.grid:getRowTextColor(row, selected)
|
function usageTab.grid:getRowTextColor(row, selected)
|
||||||
@@ -300,6 +302,7 @@ Unlocked Slots : %d of %d (%d%%)
|
|||||||
|
|
||||||
function statsTab:disable()
|
function statsTab:disable()
|
||||||
Event.off(self.handle)
|
Event.off(self.handle)
|
||||||
|
UI.Tab.disable(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
function overviewTab:draw()
|
function overviewTab:draw()
|
||||||
@@ -319,7 +322,7 @@ Unlocked Slots : %d of %d (%d%%)
|
|||||||
self.crafting.progressColor = colors.yellow
|
self.crafting.progressColor = colors.yellow
|
||||||
self.crafting.value = 100
|
self.crafting.value = 100
|
||||||
else
|
else
|
||||||
self.crafting.progressColor = colors.green
|
self.crafting.progressColor = colors.orange
|
||||||
self.crafting.value = total > 0 and math.ceil(crafted / total * 100) or 0
|
self.crafting.value = total > 0 and math.ceil(crafted / total * 100) or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -367,6 +370,7 @@ Unlocked Slots : %d of %d (%d%%)
|
|||||||
function overviewTab:disable()
|
function overviewTab:disable()
|
||||||
Event.off(self.handle)
|
Event.off(self.handle)
|
||||||
Event.off(self.ehandle)
|
Event.off(self.ehandle)
|
||||||
|
UI.Tab.disable(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
table.insert(context.loggers, function(...)
|
table.insert(context.loggers, function(...)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ local hostiles = {
|
|||||||
BabyZombie = true,
|
BabyZombie = true,
|
||||||
Bat = true,
|
Bat = true,
|
||||||
Blaze = true,
|
Blaze = true,
|
||||||
|
CaveSpider = true,
|
||||||
Creeper = true,
|
Creeper = true,
|
||||||
Ghast = true,
|
Ghast = true,
|
||||||
Husk = true,
|
Husk = true,
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
_G.requireInjector(_ENV)
|
|
||||||
|
|
||||||
local Mobs = require('neural.mobs')
|
local Mobs = require('neural.mobs')
|
||||||
local ni = require('neural.interface')
|
local ni = require('neural.interface')
|
||||||
local Point = require('point')
|
local Point = require('point')
|
||||||
local Util = require('util')
|
|
||||||
|
|
||||||
local os = _G.os
|
local os = _G.os
|
||||||
|
|
||||||
@@ -40,7 +37,6 @@ while true do
|
|||||||
local targets = findTargets()
|
local targets = findTargets()
|
||||||
if targets then
|
if targets then
|
||||||
for _, entity in ipairs(targets) do
|
for _, entity in ipairs(targets) do
|
||||||
Util.print(entity)
|
|
||||||
ni.shootAt(entity, 1)
|
ni.shootAt(entity, 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
local Config = require('config')
|
local Config = require('config')
|
||||||
local UI = require('ui')
|
local UI = require('ui')
|
||||||
|
|
||||||
|
local colors = _G.colors
|
||||||
local fs = _G.fs
|
local fs = _G.fs
|
||||||
local turtle = _G.turtle
|
local turtle = _G.turtle
|
||||||
|
|
||||||
@@ -11,7 +12,8 @@ if turtle then
|
|||||||
tabTitle = 'Home',
|
tabTitle = 'Home',
|
||||||
description = 'Turtle home location',
|
description = 'Turtle home location',
|
||||||
labelText = UI.Text {
|
labelText = UI.Text {
|
||||||
x = 3, y = 2,
|
x = 3, ex = -3, y = 2,
|
||||||
|
textColor = colors.yellow,
|
||||||
value = 'On restart, return to this location'
|
value = 'On restart, return to this location'
|
||||||
},
|
},
|
||||||
grid = UI.Grid {
|
grid = UI.Grid {
|
||||||
|
|||||||
Reference in New Issue
Block a user