diff --git a/common/recorder.lua b/common/recorder.lua index 390e10e..382c28c 100644 --- a/common/recorder.lua +++ b/common/recorder.lua @@ -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') diff --git a/milo/plugins/statsView.lua b/milo/plugins/statsView.lua index b617075..861d887 100644 --- a/milo/plugins/statsView.lua +++ b/milo/plugins/statsView.lua @@ -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 diff --git a/neural/ores.lua b/neural/ores.lua index 4eac765..b43737f 100644 --- a/neural/ores.lua +++ b/neural/ores.lua @@ -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()