This commit is contained in:
2025-10-08 09:53:02 -04:00
parent 91bf28a728
commit cabc727903
3 changed files with 6 additions and 10 deletions

View File

@@ -50,7 +50,8 @@ local lua = {
tonumber = true,
tostring = true,
type = true,
xpcall = true
xpcall = true,
sleep = true
}
for i,v in pairs(_VG) do
@@ -86,4 +87,4 @@ end
function aceVM.initVenv()
aceVM._VG = deepcopy(_VG)
end
end

View File

@@ -96,11 +96,11 @@ function aceVM.start(id, disks)
if ret[1] == false then
break
end
local timer = os.startTimer(0)
local timer = os.queueEvent("nosleep")
local exit = false
repeat
local event = {coroutine.yield()}
if event[1] == "timer" and event[2]==timer then
if event[1] == "nosleep" then
exit=true
elseif event[1]==nil then
elseif event[1]=="key" then
@@ -121,4 +121,4 @@ function aceVM.start(id, disks)
aceVM.exitVM = false
term.clear()
term.setCursorPos(1,1)
end
end