milo save status tab + update record for new pastebin link

This commit is contained in:
kepler155c@gmail.com
2019-03-21 20:28:51 -04:00
parent 3d815c6332
commit 8ca0071786
3 changed files with 19 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ local function loadAPI(url, env)
return apiEnv
end
bbpack = loadAPI('http://pastebin.com/raw/PdrJjb5S', getfenv(1))
bbpack = loadAPI('http://pastebin.com/raw/cUYTGbpb', getfenv(1))
GIF = loadAPI('http://pastebin.com/raw/5uk9uRjC', getfenv(1))
local s, m = Util.runUrl(getfenv(1), 'http://pastebin.com/raw/cUYTGbpb', 'get', 'CnLzL5fg')

View File

@@ -436,6 +436,15 @@ Unlocked Slots : %d of %d (%d%%)
UI.Tab.disable(self)
end
function page:eventHandler(event)
if event.type == 'tab_activate' then
local state = Milo:getState('statusState') or { }
state[node.name] = event.activated.tabTitle
Milo:setState('statusState', state)
end
return UI.Page.eventHandler(self, event)
end
table.insert(context.loggers, function(...)
local oterm = term.redirect(activityTab.term.win)
activityTab.term.win.scrollBottom()
@@ -449,6 +458,13 @@ Unlocked Slots : %d of %d (%d%%)
Event.onTimeout(0, function()
UI:setPage(page)
end)
-- restore active tab
local tabState = Milo:getState('statusState') or { }
if tabState[node.name] then
page.tabs:selectTab(Util.find(page.tabs, 'tabTitle', tabState[node.name]))
end
return page
end

View File

@@ -15,6 +15,7 @@ local function showRequirements(missing)
print([[A neural interface is required containing:
* Overlay glasses
* Scanner
* Modem
]])
error('Missing: ' .. missing)
end
@@ -53,7 +54,7 @@ local targets = {
["minecraft:glowstone"] = 0xFFDFA166
}
local projecting = { }
local offset = getPoint() or error('GPS not found')
local offset = getPoint() or showRequirements('GPS')
local canvas = modules.canvas3d().create()
local function update()