Styling fixes + add gitignore

This commit is contained in:
Samuel Williams 2020-12-05 22:43:18 +00:00 committed by Brandon Sturgeon
parent 847156a146
commit 8ad711091f
7 changed files with 52 additions and 9 deletions

44
.gitignore vendored Normal file
View 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

View File

@ -46,7 +46,7 @@ if DEV_MODE then
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
@ -84,7 +84,7 @@ end
local function triggerPing()
pingCancelled = false
state = api.PINGING_API
responses = {cfc = nil, global = nil}
responses = { cfc = nil, global = nil }
http.Fetch( cfc_endpoint,
function( body, size, headers, code )

View File

@ -4,7 +4,7 @@ dTimer.timers = {}
dTimer.idCounter = 0
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
function dTimer.Adjust( id, delay, reps, f )

View File

@ -53,7 +53,7 @@ disconnectMessages[crashApi.NO_INTERNET] = "Are you sure? If your internet comes
-- Helper function
local function getFrom( i, ... )
return ( {...} )[i]
return ( { ... } )[i]
end
-- Colors
@ -503,4 +503,3 @@ hook.Add( "cfc_di_crashTick", "cfc_di_interfaceUpdate", function( isCrashing, _t
end
end
end )

View File

@ -30,7 +30,7 @@ hook.Add( "ShutDown", "cfc_di_shutdown", shutdown )
local function crashTick( timedown )
local apiState = crashApi.getState();
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()
lastApiCall = SysTime()