Fix a load of issues, add luacheck and travis

This commit is contained in:
rubenwardy 2018-04-06 14:04:56 +01:00
parent c21b192f82
commit 7bd82dca86
28 changed files with 144 additions and 107 deletions

View file

@ -72,7 +72,6 @@ function ctf_stats.get_html(title, players)
for i = 1, #players do
local pstat = players[i]
local color = pstat.color or "#ffffff"
local kd = pstat.kills
if pstat.deaths > 0 then
kd = kd / pstat.deaths

View file

@ -181,7 +181,7 @@ end)
ctf_flag.register_on_precapture(function(name, flag)
local tplayer = ctf.player(name)
local main, match = ctf_stats.player(name)
local main, _ = ctf_stats.player(name)
if main then
main.wins[tplayer.team] = main.wins[tplayer.team] + 1
ctf.needs_save = true