Line 48: |
Line 48: |
| | | |
| 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 not diffs then |
− | return format{
| + | title_template_simple = [[<div id="${map} ${node}" style="width:700px;text-align:center;">${map} ${node}: ${name}</div> |
− | node == "AB" and title_template_simple or title_template,
| + | ]] |
− | map = map,
| + | 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> |
− | node = node,
| + | ]] |
− | diff = diff,
| + | return format{ |
− | name = name,
| + | node == "AB" and title_template_simple or title_template, |
− | event_number = event_number,
| + | map = map, |
− | map_number = map_number,
| + | node = node, |
− | diff_number = diff_number,
| + | name = name, |
− | }
| + | 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 |
| | | |