From 1a166bdb22e18855f74ca163d337fcb68861825e Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Thu, 11 Jun 2020 13:29:02 -0600 Subject: [PATCH] compability fixes --- busted/.package | 2 +- debugger/debug.lua | 2 +- ignore/pal.lua | 77 ++++++++++++++++++++++++++++++++++ moonscript/autorun/startup.lua | 2 +- pl/.package | 3 ++ 5 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 ignore/pal.lua diff --git a/busted/.package b/busted/.package index 3bfdfce..0a4d3e8 100644 --- a/busted/.package +++ b/busted/.package @@ -1,7 +1,7 @@ { title = 'busted', repository = 'kepler155c/opus-apps/{{OPUS_BRANCH}}/moonscript', - description = [[]], + description = [[WIP]], license = 'MIT', required = { 'penlight', diff --git a/debugger/debug.lua b/debugger/debug.lua index adf4f24..2ba1d11 100644 --- a/debugger/debug.lua +++ b/debugger/debug.lua @@ -32,7 +32,7 @@ local debugger = kernel.getCurrent() local client local function startClient() - local env = kernel.makeEnv(_ENV) + local env = kernel.makeEnv(_ENV, fs.getDir(filename)) currentFile = nil local clientId = multishell.openTab(nil, { diff --git a/ignore/pal.lua b/ignore/pal.lua new file mode 100644 index 0000000..b47c7dd --- /dev/null +++ b/ignore/pal.lua @@ -0,0 +1,77 @@ +local pals = { + { -- molokai + 0x101010, + 0x960050, + 0x66aa11, + 0xc47f2c, + 0x30309b, + 0x7e40a5, + 0x3579a8, + 0x9999aa, + 0x303030, + 0xff0090, + 0x80ff00, + 0xffba68, + 0x5f5fee, + 0xbb88dd, + 0x4eb4fa, + 0xd0d0d0, + }, + { -- solarized + 0xffffd7, + 0xd75f00, -- orange + 0x585858, + 0x0087ff, -- light blue + 0x1c1c1c, + 0x8a8a8a, + 0xd70000, -- light red + 0x808080, -- gray + 0xe4e4e4, -- light gray + 0x00afaf, -- cyan + 0x626262, + 0x5f5faf, -- blue + 0xaf8700, -- brown + 0x5f8700, -- green + 0xaf005f, -- dark red + 0x262626, -- black + }, + { + 0xf7f7f7, + 0xc4a500, -- mustard + 0xf79aff, -- magenta + 0x8dcff0, -- light blue + 0xfee14d, -- yellow + 0xc4f137, -- lime + 0x207383, -- dark green + 0x7a7a7a, + 0xa1a1a1, + 0x6ad9cf, -- greenish blue + 0xba8acc, -- purple + 0x62a3c4, -- blue gray + 0xd6837c, -- orange/brown + 0x7da900, -- green + 0xb84131, -- redish brown + 0x1b1b1b, + } +} +term.setPaletteColor(2^0,0xFFFFFF) +term.setPaletteColor(2^1,0xFF6300) +term.setPaletteColor(2^2,0xFF00DE) +term.setPaletteColor(2^3,0x00C3FF) +term.setPaletteColor(2^4,0xFFFF00) +term.setPaletteColor(2^5,0x91FF00) +term.setPaletteColor(2^6,0xFF6DA8) +term.setPaletteColor(2^7,0x585757) +term.setPaletteColor(2^8,0xA9A9A9) +term.setPaletteColor(2^9,0x00FFFF) +term.setPaletteColor(2^10,0x7700FF) +term.setPaletteColor(2^11,0x0000FF) +term.setPaletteColor(2^12,0x4C2700) +term.setPaletteColor(2^13,0x00FF00) +term.setPaletteColor(2^14,0xFF0000) +term.setPaletteColor(2^15,0x000000) + +local pal = pals[tonumber(({...})[1])] +for k,v in pairs(pal) do + term.setPaletteColour(2^(k - 1), v) +end diff --git a/moonscript/autorun/startup.lua b/moonscript/autorun/startup.lua index f50e546..0f685cd 100644 --- a/moonscript/autorun/startup.lua +++ b/moonscript/autorun/startup.lua @@ -12,7 +12,7 @@ local function compatEnv(source) local env = Map.shallowCopy(source._G) Map.merge(env, source) env._G = env - _G.requireInjector(env, 'packages/moon') + _G.requireInjector(env, 'packages/moonscript') return env end diff --git a/pl/.package b/pl/.package index 58081b7..e11e194 100644 --- a/pl/.package +++ b/pl/.package @@ -5,4 +5,7 @@ Penlight brings together a set of generally useful pure Lua modules, focusing on input data handling (such as reading configuration files), functional programming (such as map, reduce, placeholder expressions, etc), and OS path management. Much of the functionality is inspired by the Python standard libraries.]], license = 'MIT', + required = { + 'lfs', + }, }