mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
simplification of initenv file
This commit is contained in:
parent
ccc5220ca8
commit
341df1a739
24
initenv.lua
24
initenv.lua
@ -2,17 +2,17 @@
|
|||||||
-- Initialize the Post-Boot Module Environment
|
-- Initialize the Post-Boot Module Environment
|
||||||
--
|
--
|
||||||
|
|
||||||
-- initialize booted environment
|
return {
|
||||||
local init_env = function ()
|
-- initialize booted environment
|
||||||
local _require = require("cc.require")
|
init_env = function ()
|
||||||
local _env = setmetatable({}, { __index = _ENV })
|
local _require = require("cc.require")
|
||||||
|
local _env = setmetatable({}, { __index = _ENV })
|
||||||
|
|
||||||
-- overwrite require/package globals
|
-- overwrite require/package globals
|
||||||
require, package = _require.make(_env, "/")
|
require, package = _require.make(_env, "/")
|
||||||
|
|
||||||
-- reset terminal
|
-- reset terminal
|
||||||
term.clear()
|
term.clear()
|
||||||
term.setCursorPos(1, 1)
|
term.setCursorPos(1, 1)
|
||||||
end
|
end
|
||||||
|
}
|
||||||
return { init_env = init_env }
|
|
||||||
|
Loading…
Reference in New Issue
Block a user