mirror of
https://github.com/LDDestroier/CC/
synced 2025-01-09 17:00:28 +00:00
Added "quick" argument
This commit is contained in:
parent
908f184b3a
commit
fb68ed9007
34
tron.lua
34
tron.lua
@ -72,6 +72,7 @@ local resetPlayers = function()
|
|||||||
end
|
end
|
||||||
local tArg = {...}
|
local tArg = {...}
|
||||||
local useSkynet = (tArg[1] or ""):lower() == "skynet"
|
local useSkynet = (tArg[1] or ""):lower() == "skynet"
|
||||||
|
local useOnce = (tArg[2] or tArg[1] or ""):lower() == "quick"
|
||||||
local skynetPath = "skynet"
|
local skynetPath = "skynet"
|
||||||
local skynetURL = "https://raw.githubusercontent.com/osmarks/skynet/master/client.lua"
|
local skynetURL = "https://raw.githubusercontent.com/osmarks/skynet/master/client.lua"
|
||||||
|
|
||||||
@ -1015,14 +1016,7 @@ local helpScreen = function()
|
|||||||
waitForKey(0.25)
|
waitForKey(0.25)
|
||||||
end
|
end
|
||||||
|
|
||||||
local decision
|
local startGame = function()
|
||||||
|
|
||||||
local main = function()
|
|
||||||
local rVal
|
|
||||||
while true do
|
|
||||||
decision = titleScreen()
|
|
||||||
lockInput = false
|
|
||||||
if decision == "start" then
|
|
||||||
-- reset all info between games
|
-- reset all info between games
|
||||||
trail = {}
|
trail = {}
|
||||||
deadGuys = {}
|
deadGuys = {}
|
||||||
@ -1052,6 +1046,17 @@ local main = function()
|
|||||||
startCountdown()
|
startCountdown()
|
||||||
parallel.waitForAny( getInput, game, networking )
|
parallel.waitForAny( getInput, game, networking )
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local decision
|
||||||
|
|
||||||
|
local main = function()
|
||||||
|
local rVal
|
||||||
|
while true do
|
||||||
|
decision = titleScreen()
|
||||||
|
lockInput = false
|
||||||
|
if decision == "start" then
|
||||||
|
startGame()
|
||||||
elseif decision == "help" then
|
elseif decision == "help" then
|
||||||
helpScreen()
|
helpScreen()
|
||||||
elseif decision == "demo" then
|
elseif decision == "demo" then
|
||||||
@ -1062,9 +1067,18 @@ local main = function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if useSkynet then
|
if useOnce then
|
||||||
|
if useSkynet then
|
||||||
|
parallel.waitForAny(startGame, skynet.listen)
|
||||||
|
skynet.socket.close()
|
||||||
|
else
|
||||||
|
startGame()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if useSkynet then
|
||||||
parallel.waitForAny(main, skynet.listen)
|
parallel.waitForAny(main, skynet.listen)
|
||||||
skynet.socket.close()
|
skynet.socket.close()
|
||||||
else
|
else
|
||||||
main()
|
main()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user