This commit is contained in:
2025-05-24 21:22:58 +02:00
parent 21b44a71bf
commit f6f6fb89fd
10 changed files with 404 additions and 23 deletions

View File

@@ -1,11 +1,35 @@
print(component.doc("debugPrint", "log"))
print(component.invoke("debugPrint", "log", "Absolute cinema"))
-- sandbox stuff
computer.pushSignal("stuff", 123, "a", false, nil)
computer.pushSignal("stuf2", 456, "b", true, "shit")
computer.pushSignal("stuf3", 789, "c", false, -13)
local clist = component.list
function component.list(type, exact)
local m = clist()
if not type then return m end
local t = {}
for addr, kind in pairs(m) do
if exact then
if type == kind then
t[addr] = kind
end
else
if string.match(kind, type) then
t[addr] = kind
end
end
end
setmetatable(t, {
__call = function()
return next(t)
end,
})
return t
end
print(computer.popSignal())
print(computer.popSignal())
print(computer.popSignal())
print(computer.popSignal())
for addr, kind in pairs(component.list()) do
if kind == "eeprom" then
local data = component.invoke(addr, "get")
assert(load(data, "=eeprom"))()
return
end
end
error("no bios")