更改

跳转至: 导航搜索

模块:Standings

删除635字节2022年12月11日 (日) 23:59
无编辑摘要
local date_col = 6
-- .0 => .4999499, .5 => .9999999
function expand_from_old_SR_time(score)
if score:len() == 6 then
if score:sub(-1) == '0' then
score = score:sub(1, -2) .. '4999499'
elseif score:sub(-1) == '5' then
score = score:sub(1, -2) .. '9999999'
end
end
if mode == '常规HS' then
content = mw.title.new('Ballance HS排行榜'):getContent()
elseif mode == '常规SR' or mode == '连打' then
content = mw.title.new('Ballance SR排行榜'):getContent()
else
local records = select_standing(get_records(), args[1], args[2])
local score_limits = get_score_limits(args[1], args[2])
local had_score_limits = (next(score_limits) ~= nil)
local ranking = 0
local ranking_hold = 0
local highest = nil
local wikitable_str = '{| class="wikitable" style="display: inline-block; vertical-align: top"\n'
if args[2]:len() == 2 then title = '关卡 ' .. args[2] else title = args[2] end wikitable_str = wikitable_str .. '|+ <h3> 关卡 ' .. args[2] title .. '</h3>\n'
wikitable_str = wikitable_str .. '! 名次 !! 分数 !! 纪录持有者 !! 视频链接\n'
highest = remove_asterisk(record[score_col])
wikitable_str = wikitable_str .. get_score_limit_str(highest, score_limits)
if next(score_limits) == nil and had_score_limits then
ranking_hold = '附'
end
end
wikitable_str = wikitable_str .. '|-\n'
while next(score_limits) do
wikitable_str = wikitable_str .. get_score_limit_str(nil, score_limits)
end
wikitable_str = wikitable_str .. '|}\n'
return wikitable_str
end
 
function p.historical_WRs(frame)
local args = frame.args[1] and frame.args or frame:getParent().args;
local records = select_WR(get_records(), args[1], args[2])
local wikitable_str = '{| class="wikitable" style="display: inline-block; vertical-align: top"\n'
wikitable_str = wikitable_str .. '|+ <h3> 关卡 ' .. args[2] .. '</h3>\n'
wikitable_str = wikitable_str .. '! 时间 !! 纪录分数 !! 纪录持有者 !! 视频链接\n'
for key, record in ipairs(records) do
wikitable_str = wikitable_str .. '|-\n'
wikitable_str = wikitable_str .. '|' .. record[date_col]
wikitable_str = wikitable_str .. '||' .. record[score_col]
wikitable_str = wikitable_str .. '||' .. record[name_col]
wikitable_str = wikitable_str .. '||' .. record[video_col]
wikitable_str = wikitable_str .. '\n'
end
wikitable_str = wikitable_str .. '|}\n'
556
个编辑

导航菜单