From 341df1a7392c8b2a8b5194e0185f72db4dbe0c08 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Tue, 31 May 2022 16:05:05 -0400 Subject: [PATCH] simplification of initenv file --- initenv.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/initenv.lua b/initenv.lua index c66e4c3..fffb705 100644 --- a/initenv.lua +++ b/initenv.lua @@ -2,17 +2,17 @@ -- Initialize the Post-Boot Module Environment -- --- initialize booted environment -local init_env = function () - local _require = require("cc.require") - local _env = setmetatable({}, { __index = _ENV }) +return { + -- initialize booted environment + init_env = function () + local _require = require("cc.require") + local _env = setmetatable({}, { __index = _ENV }) - -- overwrite require/package globals - require, package = _require.make(_env, "/") + -- overwrite require/package globals + require, package = _require.make(_env, "/") - -- reset terminal - term.clear() - term.setCursorPos(1, 1) -end - -return { init_env = init_env } + -- reset terminal + term.clear() + term.setCursorPos(1, 1) + end +}