This commit is contained in:
Crispy 2025-05-26 02:36:15 +02:00
parent fe086e3a0c
commit 1ff3cea4d6
29 changed files with 3206 additions and 79 deletions

28
computer/1/startup.lua Normal file
View file

@ -0,0 +1,28 @@
local filename = "tobuild"
rednet.open("left")
while true do
id, message, protocol = rednet.receive()
if protocol == "getnexttobuild" then
file = fs.open(filename,"r")
line = file.readLine()
restof = file.readAll()
file.close()
file = fs.open(filename,"w")
file.write(restof)
file.close()
print(line)
rednet.send(id,line,"nexttobuild")
elseif protocol == "failedtobuild" then
print(message.."failed")
file = fs.open(filename,"r")
restof = file.readAll()
file.close()
file = fs.open(filename,"w")
file.writeLine(message)
file.write(restof)
file.close()
end
--file = fs.open(filename,"r")
--print(file.readAll())
end