Content deleted Content added
No edit summary |
No edit summary |
||
(10 intermediate revisions by the same user not shown) | |||
Line 53:
local do_tiebr = false
if yesno(use_tiebr_val) then do_tiebr = true end
-- Ties and OTL
local use_tieOTL_val = Args['use_ties'] or 'no'
local do_ties = false
if yesno(use_tieOTL_val) then do_ties = true end
-- Initialize
Line 69 ⟶ 74:
tt = p_sub.colhead(tt,32,'<abbr title="Won">W</abbr>') -- Win col
tt = p_sub.colhead(tt,32,'<abbr title="Lost">L</abbr>') -- Loss col
tt = p_sub.colhead(tt,
end▼
tt = p_sub.colhead(tt,32,OTloss_head_text)
if
tt = p_sub.colhead(tt,32,
▲ if not do_ratio then
▲ tt = p_sub.colhead(tt,36,'<abbr title="'..fa_word_sing..' ratio">'..fa_letter..'R</abbr>') -- Ratio col
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 86 ⟶ 87:
else
tt = p_sub.colhead(tt,36,'<abbr title="'..fa_word_sing..' ratio">'..fa_letter..'R</abbr>') -- Ratio col
▲ end
end
end
Line 109:
local loss_points = tonumber(Args['losspoints']) or 0
local OTloss_points = tonumber(Args['OTlosspoints']) or 1
local ties_points = tonumber(Args['tiepoints']) or 1
-- Get some input
Line 114 ⟶ 115:
local losses = tonumber(Args['loss_'..team_code_ii]) or 0
local OTlosses = tonumber(Args['OTloss_'..team_code_ii]) or 0
local ties = tonumber(Args['ties_'..team_code_ii]) or 0
local tiebr_val = tonumber(Args['tiebr_'..team_code_ii]) or 0
local gfor = tonumber(Args['gf_'..team_code_ii]) or tonumber(Args['pf_'..team_code_ii]) or 0
Line 120 ⟶ 122:
local hth_local = Args['hth_'..team_code_ii] or nil
-- Then calculate some values
local matches = wins + losses + OTlosses + ties
local points = win_points*wins + loss_points*losses + OTloss_points*OTlosses + s_pts + ties_points*ties
-- Comparison of for against
Line 150 ⟶ 152:
local do_tiebr = false
if yesno(use_tiebr_val) then do_tiebr = true end
-- Ties and OTL
local use_tieOTL_val = Args['use_ties'] or 'no'
local do_ties = false
if yesno(use_tieOTL_val) then do_ties = true end
-- Some local vars
Line 163 ⟶ 170:
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..wins..'\n') -- Won
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..losses..'\n') -- Lost
if do_ties then
end▼
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..OTlosses..'\n') -- Lost in OT
if
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..tiebr_val..'\n') -- Tiebreaker value▼
end
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gfor..'\n') -- GF
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gaig..'\n') -- GA
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gcomp..'\n') -- Goal comparison
▲ table.insert(t,'| style="'..ii_fw..bg_col..'" |'..tiebr_val..'\n') -- Tiebreaker value
▲ table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gaig..'\n') -- GA
▲ end
end
-- Add − for negative point totals
|