Update tron.lua

This commit is contained in:
LDDestroier 2019-02-28 23:49:50 -05:00 committed by GitHub
parent 2bd56706e4
commit 869a8b29d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 21 deletions

View File

@ -250,32 +250,34 @@ if argumentName then
end
local modem, skynet
if useSkynet then
if fs.exists(skynetPath) then
skynet = dofile(skynetPath)
skynet.open(port)
else
local prog = http.get(skynetURL)
if prog then
local file = fs.open(skynetPath, "w")
file.write(prog.readAll())
file.close()
if not doGridDemo then
if useSkynet then
if fs.exists(skynetPath) then
skynet = dofile(skynetPath)
skynet.open(port)
else
error("Could not download Skynet.")
local prog = http.get(skynetURL)
if prog then
local file = fs.open(skynetPath, "w")
file.write(prog.readAll())
file.close()
skynet = dofile(skynetPath)
skynet.open(port)
else
error("Could not download Skynet.")
end
end
end
else
modem = peripheral.find("modem")
if (not modem) and ccemux then
ccemux.attach("top", "wireless_modem")
modem = peripheral.find("modem")
end
if modem then
modem.open(port)
else
error("You should attach a modem.")
modem = peripheral.find("modem")
if (not modem) and ccemux then
ccemux.attach("top", "wireless_modem")
modem = peripheral.find("modem")
end
if modem then
modem.open(port)
else
error("You should attach a modem.")
end
end
end