This commit is contained in:
2025-09-29 14:31:03 -04:00
parent 701bfa5198
commit 1a92ff1bd2
5 changed files with 27 additions and 9 deletions

View File

@@ -2,6 +2,27 @@ local fss = {}
local object = {} local object = {}
local uObject = {} local uObject = {}
local function deepcopy(orig, copies)
copies = copies or {}
if type(orig) ~= 'table' then
return orig
elseif copies[orig] then
return copies[orig]
end
local copy = {}
copies[orig] = copy
for k, v in next, orig, nil do
local copied_key = deepcopy(k, copies)
local copied_val = deepcopy(v, copies)
copy[copied_key] = copied_val
end
return copy
end
local function getFs(disk) local function getFs(disk)
return fss[tostring(disk.__UDATA_id)] return fss[tostring(disk.__UDATA_id)]
end end

View File

@@ -20,7 +20,7 @@ local function deepcopy(orig, copies)
end end
local _VG = deepcopy(_G) local _VG = deepcopy(_G)
_VG._G=_VG _VG._G=_VG
_G.deepcopy=deepcopy
function string.split(str, delim, maxResultCountOrNil) function string.split(str, delim, maxResultCountOrNil)
assert(#delim == 1, "only delim len 1 supported for now") assert(#delim == 1, "only delim len 1 supported for now")
maxResultCountOrNil = (maxResultCountOrNil or 0)-1 maxResultCountOrNil = (maxResultCountOrNil or 0)-1
@@ -106,6 +106,7 @@ for i,v in ipairs(fs.list("/AceVM/components/")) do
load(code)() load(code)()
end end
local file=fs.open("/computers/0/bios.lua","r") local file=fs.open("/computers/0/bios.lua","r")
local bios=file.readAll() local bios=file.readAll()
file.close() file.close()
@@ -129,7 +130,7 @@ while true do
elseif event[1]=="key" then elseif event[1]=="key" then
addEventRaw("keyPressed", 1, event[2]) addEventRaw("keyPressed", 1, event[2])
if akeys[event[2]] then if akeys[event[2]] then
addEventRaw("keyTyped", 1, keys[event[2]]) addEventRaw("keyTyped", 1, akeys[event[2]])
end end
elseif event[1]=="char" then elseif event[1]=="char" then
addEventRaw("keyTyped", 1, event[2]) addEventRaw("keyTyped", 1, event[2])

View File

@@ -1,11 +1,6 @@
local computer = component.getFirst("computer") local computer = component.getFirst("computer")
local screen=component.getFirst("screen") local screen=component.getFirst("screen")
while true do
local event = {computer.getMachineEvent()}
if event[1]~= nil then
screen.print(table.unpack(event))
end
end
if not screen then if not screen then
local function e(...)end local function e(...)end
screen = { screen = {

View File

@@ -1,6 +1,6 @@
HyperionOS HyperionOS
disk_1 disk_1
/boot/hyprkrnl.sys /boot/Hyprkrnl.sys
$EOF $EOF

View File

@@ -7,6 +7,7 @@ end
-- Copyright (C) 2025 ASTRONAND -- Copyright (C) 2025 ASTRONAND
-- Get boot arguments -- Get boot arguments
_G.component=component
local bootArgs=({...})[1] local bootArgs=({...})[1]
local bootDrive=bootArgs.bootDrive local bootDrive=bootArgs.bootDrive
local LOG_TEXT="" local LOG_TEXT=""