mirror of
https://github.com/LDDestroier/CC/
synced 2025-04-07 19:16:39 +00:00
Allows you to update without modem
This commit is contained in:
parent
cf883e5394
commit
465747fb52
35
tron.lua
35
tron.lua
@ -322,6 +322,24 @@ if argumentName then
|
||||
argumentName = argumentName:sub(1, 15) -- gotta enforce that limit
|
||||
end
|
||||
|
||||
if doUpdateGame then
|
||||
print("Downloading...")
|
||||
local net = http.get("https://github.com/LDDestroier/CC/raw/master/tron.lua")
|
||||
if net then
|
||||
local file = fs.open(shell.getRunningProgram(), "w")
|
||||
file.write(net.readAll())
|
||||
file.close()
|
||||
print("Updated!")
|
||||
else
|
||||
printError("Couldn't update!")
|
||||
end
|
||||
if useOnce then
|
||||
return
|
||||
else
|
||||
sleep(0.2)
|
||||
end
|
||||
end
|
||||
|
||||
local modem, skynet
|
||||
if not doGridDemo then
|
||||
if useSkynet then
|
||||
@ -1695,23 +1713,6 @@ local main = function()
|
||||
end
|
||||
end
|
||||
|
||||
if doUpdateGame then
|
||||
print("Downloading...")
|
||||
local net = http.get("https://github.com/LDDestroier/CC/raw/master/tron.lua")
|
||||
if net then
|
||||
local file = fs.open(shell.getRunningProgram(), "w")
|
||||
file.write(net.readAll())
|
||||
file.close()
|
||||
print("Updated!")
|
||||
else
|
||||
printError("Couldn't update!")
|
||||
end
|
||||
if useOnce then
|
||||
return
|
||||
else
|
||||
sleep(0.2)
|
||||
end
|
||||
end
|
||||
if doGridDemo then
|
||||
parallel.waitForAny(function()
|
||||
local step, gsX, gsY = 0, 0, 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user