cleanup
This commit is contained in:
@@ -11,15 +11,15 @@ local multishell = _ENV.multishell
|
|||||||
|
|
||||||
multishell.setTitle(multishell.getCurrent(), 'Music')
|
multishell.setTitle(multishell.getCurrent(), 'Music')
|
||||||
|
|
||||||
|
if not turtle then
|
||||||
|
error('This program can only be run on a turtle')
|
||||||
|
end
|
||||||
|
|
||||||
local radio = device.drive or error('No drive attached')
|
local radio = device.drive or error('No drive attached')
|
||||||
if radio.side ~= 'top' and radio.side ~= 'bottom' then
|
if radio.side ~= 'top' and radio.side ~= 'bottom' then
|
||||||
error('Disk drive must be above or below turtle')
|
error('Disk drive must be above or below turtle')
|
||||||
end
|
end
|
||||||
|
|
||||||
if not turtle then
|
|
||||||
error('This program can only be run on a turtle')
|
|
||||||
end
|
|
||||||
|
|
||||||
UI:configure('Music', ...)
|
UI:configure('Music', ...)
|
||||||
|
|
||||||
UI.Button.defaults.backgroundFocusColor = colors.gray
|
UI.Button.defaults.backgroundFocusColor = colors.gray
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local injector = requireInjector or load(http.get('https://raw.githubusercontent.com/kepler155c/opus/master/sys/apis/injector.lua').readAll())()
|
local injector = _G.requireInjector or load(http.get('https://raw.githubusercontent.com/kepler155c/opus/develop/sys/apis/injector.lua').readAll())()
|
||||||
injector()
|
injector()
|
||||||
|
|
||||||
local Canvas = require('ui.canvas')
|
local Canvas = require('ui.canvas')
|
||||||
@@ -7,6 +7,7 @@ local Util = require('util')
|
|||||||
local colors = _G.colors
|
local colors = _G.colors
|
||||||
local os = _G.os
|
local os = _G.os
|
||||||
local peripheral = _G.peripheral
|
local peripheral = _G.peripheral
|
||||||
|
local printError = _G.printError
|
||||||
local shell = _ENV.shell
|
local shell = _ENV.shell
|
||||||
local term = _G.term
|
local term = _G.term
|
||||||
local window = _G.window
|
local window = _G.window
|
||||||
|
|||||||
@@ -83,7 +83,10 @@ local function loadAPI(url, env)
|
|||||||
apiEnv.shell = nil
|
apiEnv.shell = nil
|
||||||
apiEnv.multishell = nil
|
apiEnv.multishell = nil
|
||||||
setmetatable(apiEnv, { __index = _G })
|
setmetatable(apiEnv, { __index = _G })
|
||||||
local fn = Util.loadUrl(url, apiEnv)
|
local fn, m = Util.loadUrl(url, apiEnv)
|
||||||
|
if not fn then
|
||||||
|
error(m)
|
||||||
|
end
|
||||||
fn()
|
fn()
|
||||||
return apiEnv
|
return apiEnv
|
||||||
end
|
end
|
||||||
@@ -91,7 +94,10 @@ end
|
|||||||
bbpack = loadAPI('http://pastebin.com/raw/PdrJjb5S', getfenv(1))
|
bbpack = loadAPI('http://pastebin.com/raw/PdrJjb5S', getfenv(1))
|
||||||
GIF = loadAPI('http://pastebin.com/raw/5uk9uRjC', getfenv(1))
|
GIF = loadAPI('http://pastebin.com/raw/5uk9uRjC', getfenv(1))
|
||||||
|
|
||||||
Util.runUrl(getfenv(1), 'http://pastebin.com/raw/cUYTGbpb', 'get', 'CnLzL5fg')
|
local s, m = Util.runUrl(getfenv(1), 'http://pastebin.com/raw/cUYTGbpb', 'get', 'CnLzL5fg')
|
||||||
|
if not s then
|
||||||
|
error(m)
|
||||||
|
end
|
||||||
-- 'Y0eLUPtr')
|
-- 'Y0eLUPtr')
|
||||||
-- CnLzL5fg
|
-- CnLzL5fg
|
||||||
local function snooze()
|
local function snooze()
|
||||||
|
|||||||
Reference in New Issue
Block a user