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 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)
return fss[tostring(disk.__UDATA_id)]
end

View File

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