| Line 80: |
Line 80: |
| | !style="cellpadding:10px;width:20%;" colspan="2" |Rewards | | !style="cellpadding:10px;width:20%;" colspan="2" |Rewards |
| | |- | | |- |
| − | |style="background:gray;" colspan="14"| | + | |style="background:gray;" colspan="14"|]=] |
| − | ]=] | |
| | | | |
| | local function pad(n) | | local function pad(n) |
| Line 136: |
Line 135: |
| | } | | } |
| | end | | end |
| − |
| |
| − | local tabberTemplate = [=[{{#tag:tabber|
| |
| − | {{!}}-{{!}}Total yield =
| |
| − | %s
| |
| − | }}]=]
| |
| | | | |
| | local function render(frame) | | local function render(frame) |
| Line 148: |
Line 142: |
| | local es = U.ifilter(data, function(e) return e.maparea_id == world end) | | local es = U.ifilter(data, function(e) return e.maparea_id == world end) |
| | | | |
| − | local total = U.format{ | + | local result = { "<tabber>" } |
| | + | |
| | + | table.insert(result, "|-|Total yield=") |
| | + | |
| | + | table.insert(result, U.format{ |
| | tableHeader, | | tableHeader, |
| | icon = isons[world], | | icon = isons[world], |
| | background = headerBackgrounds[world], | | background = headerBackgrounds[world], |
| | name = worldNames[world], | | name = worldNames[world], |
| − | } .. U.joinLines(U.imap(es, function(e, i) | + | }) |
| | + | |
| | + | table.insert(result, U.joinLines(U.imap(es, function(e, i) |
| | local id = e.disp_no | | local id = e.disp_no |
| | return U.format{ | | return U.format{ |
| Line 173: |
Line 173: |
| | item2 = e.win_item2[1] > 0 and formatItem(e.win_item2[1], e.win_item2[2]) or '', | | item2 = e.win_item2[1] > 0 and formatItem(e.win_item2[1], e.win_item2[2]) or '', |
| | } | | } |
| − | end)) .. "\n|}" | + | end))) |
| | + | |
| | + | table.insert(result, "|}") |
| | + | |
| | + | table.insert(result, "</tabber>") |
| | | | |
| − | return frame:preprocess(string.format(tabberTemplate, total)) | + | return frame:preprocess(table.concat(result, "\n")) |
| | end | | end |
| | | | |