Content deleted Content added
No edit summary |
No edit summary |
||
Line 24:
local PKloss_head_text = Args['PKloss_header'] or '<abbr title="Lost on penalty kicks">PKL</abbr>'
local bonus_head_text = Args['bonus_header'] or '<abbr title="Bonus points">BP</abbr>'
local tiebr_head_text = Args['tiebr_header'] or '<abbr title="Tiebreaker">TBR</abbr>'
-- What to rank the teams by
Line 66 ⟶ 67:
-- True if exist, false otherwise
local show_bonus_points = yesno(Args['show_bonus_points'] or 'no')
local show_tiebr = yesno(Args['show_tiebr'] or 'no')
-- Whether to show the OT win and OT loss and draw columns
Line 73 ⟶ 75:
local show_PKloss = yesno(Args['showPKloss'] or 'no')
local show_draw = yesno(Args['show_draw'] or 'yes')
local OTloss_after = yesno(Args['OTloss_after_loss'] or 'no')
local PKloss_after = yesno(Args['PKloss_after_loss'] or 'no')
-- Use games behind header
Line 100 ⟶ 104:
tt = p_sub.colhead(tt,32,'<abbr title="Drawn">D</abbr>') -- Draw col
end
if show_OTloss and not OTloss_after then t = p_sub.colhead(tt,32,OTloss_head_text) end
if show_PKloss and not PKloss_after then t = p_sub.colhead(tt,32,PKloss_head_text) end
tt = p_sub.colhead(tt,32,'<abbr title="Lost">L</abbr>') -- Loss col
if show_OTloss and OTloss_after then t = p_sub.colhead(tt,32,OTloss_head_text) end
if show_PKloss and PKloss_after then t = p_sub.colhead(tt,32,PKloss_head_text) end
if show_tiebr then t = p_sub.colhead(tt,32,tiebr_head_text) end
tt = p_sub.colhead(tt,32,'<abbr title="'..fa_word_plur..' for">'..fa_letter..'F</abbr>') -- For col
tt = p_sub.colhead(tt,32,'<abbr title="'..fa_word_plur..' against">'..fa_letter..'A</abbr>') -- Against col
Line 155 ⟶ 162:
local PKlosses = tonumber(Args['PKloss_'..team_code_ii]) or 0
local losses = tonumber(Args['loss_'..team_code_ii]) or 0
local tiebr = tonumber(Args['tiebr_'..team_code_ii]) or 0
local gfor = tonumber(Args['gf_'..team_code_ii] or Args['pf_'..team_code_ii] or '0') or '?'
local gaig = tonumber(Args['ga_'..team_code_ii] or Args['pa_'..team_code_ii] or '0') or '?'
Line 265 ⟶ 273:
local show_PKloss = yesno(Args['showPKloss'] or 'no')
local show_draw = yesno(Args['show_draw'] or 'yes')
local OTloss_after = yesno(Args['OTloss_after_loss'] or 'no')
local PKloss_after = yesno(Args['PKloss_after_loss'] or 'no')
-- Some local vars
Line 299 ⟶ 309:
local show_played = not yesno(Args['hide_played'] or 'no')
local show_bonus_points = yesno(Args['show_bonus_points'] or 'no')
local show_tiebr = yesno(Args['show_tiebr'] or 'no')
-- Row building
if show_played then
Line 328 ⟶ 339:
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..draws..'\n') -- Drawn
end
if show_OTloss and not OTloss_after then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..OTlosses..'\n') -- Lost in OT
end
if show_PKloss and not PKloss_after then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..PKlosses..'\n') -- Lost on PKs
end
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..losses..'\n') -- Lost
if show_OTloss and OTloss_after then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..OTlosses..'\n') -- Lost in OT
end
if show_PKloss and PKloss_after then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..PKlosses..'\n') -- Lost on PKs
end
if show_tiebr then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..tiebr..'\n') -- Tie breaker
end
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gfor..'\n') -- GF
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gaig..'\n') -- GA
|