mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 02:39:48 -04:00
Cleanup and fixery.
This commit is contained in:
parent
f61d159b28
commit
f82669e3df
@ -133,7 +133,7 @@ do
|
|||||||
return l
|
return l
|
||||||
end
|
end
|
||||||
|
|
||||||
function capture_to_close(ms)
|
local function capture_to_close(ms)
|
||||||
local level = ms.level
|
local level = ms.level
|
||||||
while level > 0 do
|
while level > 0 do
|
||||||
level = level - 1
|
level = level - 1
|
||||||
@ -625,21 +625,6 @@ end
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
local loadHookMetatable
|
|
||||||
loadHookMetatable = {
|
|
||||||
[persistKey and persistKey() or "LuaJ"] = function()
|
|
||||||
return function()
|
|
||||||
-- Has to be re-applied after loading saved state because global
|
|
||||||
-- metatables (such as the string one) aren't persisted automatically.
|
|
||||||
installPatternSandbox()
|
|
||||||
return setmetatable({}, loadHookMetatable)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
}
|
|
||||||
local loadHook = setmetatable({}, loadHookMetatable)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
local function spcall(...)
|
local function spcall(...)
|
||||||
local result = table.pack(pcall(...))
|
local result = table.pack(pcall(...))
|
||||||
if not result[1] then
|
if not result[1] then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user