Line 6: |
Line 6: |
| ]] | | ]] |
| | | |
− | local title_template = [[<div id="${map} ${node} ${diff}" style="width:700px;text-align:center;">${map} ${node}: ${name} ([http://db.kcwiki.moe/drop/map/${event_number}${map_number}${diff_number}/${node}-SAB.html PoiDB])</div> | + | local title_template = [[<div id="${map} ${node} ${diff}" style="width:700px;text-align:center;">${map} ${node}: ${name} ([http://db.kcwiki.moe/drop/map/${event_number}${map_number}/${diff_number}/${node}-SAB.html PoiDB])</div> |
| ]] | | ]] |
| | | |
| local event_numbers = { | | local event_numbers = { |
− | ["World 1"] = 1,
| |
− | ["World 2"] = 2,
| |
− | ["World 3"] = 3,
| |
− | ["World 4"] = 4,
| |
− | ["World 5"] = 5,
| |
− | ["World 6"] = 6,
| |
− | ["World 1: 鎮守府海域"] = 1,
| |
− | ["World 2: 南西諸島海域"] = 2,
| |
− | ["World 3: 北方海域"] = 3,
| |
− | ["World 4: 西方海域"] = 4,
| |
− | ["World 5: 南方海域"] = 5,
| |
− | ["World 6: 中部海域"] = 6,
| |
| ["Winter 2016 Event"] = 33, | | ["Winter 2016 Event"] = 33, |
| ["Spring 2016 Event"] = 34, | | ["Spring 2016 Event"] = 34, |
Line 54: |
Line 42: |
| | | |
| local event_number = event_numbers[event] or "?" | | local event_number = event_numbers[event] or "?" |
| + | |
| + | local diffs = (event_number == "?" or event_number >= 41) and diff_numbers2 or diff_numbers |
| | | |
| local node = args[1] or "?" | | local node = args[1] or "?" |
− | | + | local diff = diffs[args.diff] and args.diff or "?" |
| local name = args.name or "?" | | local name = args.name or "?" |
| | | |
| | | |
| local map_number = string.match(map, "%d") or "?" | | local map_number = string.match(map, "%d") or "?" |
− | | + | local diff_number = diffs[diff] or "?" |
− | if event_number <= 6 then
| + | |
− | title_template_simple = [[<div id="${map} ${node}" style="width:700px;text-align:center;">${map} ${node}: ${name}</div>
| + | return format{ |
− | ]]
| + | node == "AB" and title_template_simple or title_template, |
− | title_template = [[<div id="${map} ${node}" style="width:700px;text-align:center;">${map} ${node}: ${name} ([http://db.kcwiki.moe/drop/map/${event_number}${map_number}/${node}-SAB.html PoiDB])</div>
| + | map = map, |
− | ]]
| + | node = node, |
− | return format{
| + | diff = diff, |
− | node == "AB" and title_template_simple or title_template,
| + | name = name, |
− | map = map,
| + | event_number = event_number, |
− | node = node,
| + | map_number = map_number, |
− | name = name,
| + | diff_number = diff_number, |
− | event_number = event_number,
| + | } |
− | map_number = map_number,
| + | |
− | }
| |
− | else
| |
− | local diffs = (event_number == "?" or event_number >= 41) and diff_numbers2 or diff_numbers
| |
− | local diff_number = diffs[diff] or "?"
| |
− | local diff = diffs[args.diff] and args.diff or "?"
| |
− | return format{
| |
− | node == "AB" and title_template_simple or title_template,
| |
− | map = map,
| |
− | node = node,
| |
− | diff = diff,
| |
− | name = name,
| |
− | event_number = event_number,
| |
− | map_number = map_number,
| |
− | diff_number = diff_number,
| |
− | }
| |
− | end
| |
| end | | end |
| | | |