This commit is contained in:
Astronand committed 2025-09-30 12:20:47 -04:00
1 parent 1a92ff1bd2
commit 91bf28a728
65 files changed
+2587 -240

No files matched your search

+8 -5
View File
@@ -1,7 +1,5 @@
local object = {}
local file = fs.open("/computers/0/nvram.dat", "r")
local nvram = string.split(file.readAll(), "\n")
file.close()
local nvram = {}
function object.getMachineEvent()
if INTERNAL_EVENT_QUEUE[1]==nil then
@@ -30,7 +28,7 @@ function object.setData(addr, data)
end
function object.saveData()
local file=fs.open("/nvram.dat", "w")
local file=fs.open("/AceVM/computers/"..tostring(aceVM.id).."/nvram.dat", "w")
file.write(table.concat(nvram,"\n"))
end
@@ -39,4 +37,9 @@ object.shutdown=os.shutdown
function object.beep() end -- IDK how i should implement this
newComponent("computer", object)
function aceVM.components.computer(id)
local file = fs.open("/AceVM/computers/"..tostring(id).."/nvram.dat", "r")
nvram = string.split(file.readAll(), "\n")
file.close()
aceVM.newComponent("computer", object)
end