From 869a8b29d3c031576b40be5542343d87f404a69c Mon Sep 17 00:00:00 2001 From: LDDestroier Date: Thu, 28 Feb 2019 23:49:50 -0500 Subject: [PATCH] Update tron.lua --- tron.lua | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/tron.lua b/tron.lua index fe49736..fbe7efd 100644 --- a/tron.lua +++ b/tron.lua @@ -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