mirror of
https://github.com/LDDestroier/CC/
synced 2025-02-07 14:40:03 +00:00
Update tron.lua
This commit is contained in:
parent
2bd56706e4
commit
869a8b29d3
44
tron.lua
44
tron.lua
@ -250,32 +250,34 @@ if argumentName then
|
|||||||
end
|
end
|
||||||
|
|
||||||
local modem, skynet
|
local modem, skynet
|
||||||
if useSkynet then
|
if not doGridDemo then
|
||||||
if fs.exists(skynetPath) then
|
if useSkynet then
|
||||||
skynet = dofile(skynetPath)
|
if fs.exists(skynetPath) then
|
||||||
skynet.open(port)
|
|
||||||
else
|
|
||||||
local prog = http.get(skynetURL)
|
|
||||||
if prog then
|
|
||||||
local file = fs.open(skynetPath, "w")
|
|
||||||
file.write(prog.readAll())
|
|
||||||
file.close()
|
|
||||||
skynet = dofile(skynetPath)
|
skynet = dofile(skynetPath)
|
||||||
skynet.open(port)
|
skynet.open(port)
|
||||||
else
|
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
|
||||||
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
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user