1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-12-24 09:58:06 +11:00
Zorya-NEO/mods/loader_openos/init.lua

25 lines
761 B
Lua
Raw Normal View History

2020-01-15 12:07:27 +11:00
local zy = krequire("zorya")
--zy.loadmod("vdev_biosdev")
local utils = krequire("utils")
--local vdev = krequire("zorya").loadmod("util_vdev")
2020-03-13 08:01:05 +11:00
local vdev = krequire("util_vcomponent")
2020-01-15 12:07:27 +11:00
return function(addr)
local fs = component.proxy(addr)
--vdev.overwrite(_G)
2020-03-13 08:01:05 +11:00
--[[function computer.getBootAddress()
2020-01-15 12:07:27 +11:00
return addr
end
function computer.setBootAddress()end
2020-03-13 08:01:05 +11:00
local env = utils.deepcopy(_G)
env._ENV = env
env._G = env
env.krequire = nil]]
--vdev.install(env)
2020-01-15 12:07:27 +11:00
--log(env, env.computer, env.computer.getBootAddress, env.computer.getBootAddress())
2020-03-13 08:01:05 +11:00
function computer.getBootAddress()
return addr
end
function computer.setBootAddress()end
2020-03-12 09:19:08 +11:00
local old_dl = utils.debug_log
2020-03-13 08:01:05 +11:00
load(utils.readfile(fs.address, fs.open("init.lua")), "=init.lua", "t", env)()
2020-01-15 12:07:27 +11:00
end