Styling fixes + add gitignore
This commit is contained in:
parent
847156a146
commit
8ad711091f
44
.gitignore
vendored
Normal file
44
.gitignore
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# Compiled Lua sources
|
||||||
|
luac.out
|
||||||
|
|
||||||
|
# Projects
|
||||||
|
*.sublime-*
|
||||||
|
|
||||||
|
# luarocks build files
|
||||||
|
*.src.rock
|
||||||
|
*.zip
|
||||||
|
*.tar.gz
|
||||||
|
|
||||||
|
# Object files
|
||||||
|
*.o
|
||||||
|
*.os
|
||||||
|
*.ko
|
||||||
|
*.obj
|
||||||
|
*.elf
|
||||||
|
|
||||||
|
# Precompiled Headers
|
||||||
|
*.gch
|
||||||
|
*.pch
|
||||||
|
|
||||||
|
# Libraries
|
||||||
|
*.lib
|
||||||
|
*.a
|
||||||
|
*.la
|
||||||
|
*.lo
|
||||||
|
*.def
|
||||||
|
*.exp
|
||||||
|
|
||||||
|
# Shared objects (inc. Windows DLLs)
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.so.*
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
*.exe
|
||||||
|
*.out
|
||||||
|
*.app
|
||||||
|
*.i*86
|
||||||
|
*.x86_64
|
||||||
|
*.hex
|
||||||
|
|
@ -11,4 +11,4 @@ AddCSLuaFile( "cfc_disconnect_interface/client/cl_detached_timer.lua" )
|
|||||||
|
|
||||||
resource.AddSingleFile( "materials/icons/cross.png" )
|
resource.AddSingleFile( "materials/icons/cross.png" )
|
||||||
|
|
||||||
include( "cfc_disconnect_interface/server/sv_pinger.lua" )
|
include( "cfc_disconnect_interface/server/sv_pinger.lua" )
|
||||||
|
@ -46,7 +46,7 @@ if DEV_MODE then
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local responses = {cfc = nil, global = nil} -- Does nothing but helps with clarity
|
local responses = { cfc = nil, global = nil } -- Does nothing but helps with clarity
|
||||||
|
|
||||||
local state = api.INACTIVE
|
local state = api.INACTIVE
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ end
|
|||||||
local function triggerPing()
|
local function triggerPing()
|
||||||
pingCancelled = false
|
pingCancelled = false
|
||||||
state = api.PINGING_API
|
state = api.PINGING_API
|
||||||
responses = {cfc = nil, global = nil}
|
responses = { cfc = nil, global = nil }
|
||||||
|
|
||||||
http.Fetch( cfc_endpoint,
|
http.Fetch( cfc_endpoint,
|
||||||
function( body, size, headers, code )
|
function( body, size, headers, code )
|
||||||
|
@ -4,7 +4,7 @@ dTimer.timers = {}
|
|||||||
dTimer.idCounter = 0
|
dTimer.idCounter = 0
|
||||||
|
|
||||||
function dTimer.Create( id, delay, reps, f )
|
function dTimer.Create( id, delay, reps, f )
|
||||||
dTimer.timers[id] = {id = id, delay = delay, reps = reps, func = f, lastCall = SysTime()}
|
dTimer.timers[id] = { id = id, delay = delay, reps = reps, func = f, lastCall = SysTime() }
|
||||||
end
|
end
|
||||||
|
|
||||||
function dTimer.Adjust( id, delay, reps, f )
|
function dTimer.Adjust( id, delay, reps, f )
|
||||||
@ -55,4 +55,4 @@ hook.Add( "Think", "cfc_di_detatched_timer", function()
|
|||||||
curTimer.func()
|
curTimer.func()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end )
|
end )
|
||||||
|
@ -53,7 +53,7 @@ disconnectMessages[crashApi.NO_INTERNET] = "Are you sure? If your internet comes
|
|||||||
|
|
||||||
-- Helper function
|
-- Helper function
|
||||||
local function getFrom( i, ... )
|
local function getFrom( i, ... )
|
||||||
return ( {...} )[i]
|
return ( { ... } )[i]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Colors
|
-- Colors
|
||||||
@ -503,4 +503,3 @@ hook.Add( "cfc_di_crashTick", "cfc_di_interfaceUpdate", function( isCrashing, _t
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end )
|
end )
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ hook.Add( "ShutDown", "cfc_di_shutdown", shutdown )
|
|||||||
local function crashTick( timedown )
|
local function crashTick( timedown )
|
||||||
local apiState = crashApi.getState();
|
local apiState = crashApi.getState();
|
||||||
if ( apiState == crashApi.INACTIVE ) or -- No ping sent
|
if ( apiState == crashApi.INACTIVE ) or -- No ping sent
|
||||||
( SysTime() - lastApiCall > API_TIMEOUT ) then -- API_TIMEOUT has passed
|
( SysTime() - lastApiCall > API_TIMEOUT ) then -- API_TIMEOUT has passed
|
||||||
crashApi.triggerPing()
|
crashApi.triggerPing()
|
||||||
lastApiCall = SysTime()
|
lastApiCall = SysTime()
|
||||||
|
|
||||||
|
@ -27,4 +27,4 @@ end )
|
|||||||
hook.Add( "ShutDown", "cfc_di", function()
|
hook.Add( "ShutDown", "cfc_di", function()
|
||||||
net.Start( "cfc_di_shutdown" )
|
net.Start( "cfc_di_shutdown" )
|
||||||
net.Send( players )
|
net.Send( players )
|
||||||
end )
|
end )
|
||||||
|
Loading…
Reference in New Issue
Block a user