require improvements, remove global Util

This commit is contained in:
kepler155c@gmail.com
2017-09-05 02:09:31 -04:00
parent 2b1d96ab37
commit ae7508e89b
82 changed files with 506 additions and 455 deletions

View File

@@ -14,10 +14,15 @@ end
multishell.term = term.current()
local defaultEnv = Util.shallowCopy(getfenv(1))
local defaultEnv = { }
for k,v in pairs(getfenv(1)) do
defaultEnv[k] = v
end
requireInjector(getfenv(1))
require = requireInjector(getfenv(1))
local Config = require('config')
local Util = require('util')
-- Begin multishell
local parentTerm = term.current()
@@ -557,9 +562,7 @@ while true do
elseif sEvent == "mouse_click" then
local button, x, y = tEventData[1], tEventData[2], tEventData[3]
lastClicked = nil
if y == 1 and os.locked then
-- ignore
elseif y == 1 then
if y == 1 then
-- Switch process
local w, h = parentTerm.getSize()
if x == 1 then