Line 3: |
Line 3: |
| local view = require('Module:View') | | local view = require('Module:View') |
| local data = require('Module:Data/Expedition') | | local data = require('Module:Data/Expedition') |
| + | |
| + | local shipCodes = { |
| + | [1] = 'DE', |
| + | [2] = 'DD', |
| + | [3] = 'CL', |
| + | [4] = 'CLT', |
| + | [5] = 'CA', |
| + | [6] = 'CAV', |
| + | [7] = 'CVL', |
| + | [8] = 'FBB', |
| + | [9] = 'BB', |
| + | [10] = 'BBV', |
| + | [11] = 'CV', |
| + | [12] = 'B', |
| + | [13] = 'SS', |
| + | [14] = 'SSV', |
| + | [15] = 'AP', |
| + | [16] = 'AV', |
| + | [17] = 'LHA', |
| + | [18] = 'CVB', |
| + | [19] = 'AR', |
| + | [20] = 'AS', |
| + | [21] = 'CT', |
| + | [22] = 'AO', |
| + | } |
| | | |
| local backgrounds = { | | local backgrounds = { |
Line 185: |
Line 210: |
| [9] = 'S+', | | [9] = 'S+', |
| } | | } |
| + | |
| + | local function formatSampleFleet(xs) |
| + | return U.ijoin(U.imap(U.ifilter(xs, function(e) return e > 0 end), function(e) return shipCodes[e] or '??' end), ' ') |
| + | end |
| | | |
| local function formatRow(args, e, i, hourly, req) | | local function formatRow(args, e, i, hourly, req) |
Line 207: |
Line 236: |
| sum = args.explicit[id .. ' sum'] or '??', | | sum = args.explicit[id .. ' sum'] or '??', |
| level = args.explicit[id .. ' level'] or '??', | | level = args.explicit[id .. ' level'] or '??', |
− | fleet = (e.reset_type == 1 and 'Monthly expedtion<br>' or '') .. (args.explicit[id .. ' fleet'] or '??'), | + | fleet = (e.reset_type == 1 and 'Monthly expedtion<br>' or '') .. (args.explicit[id .. ' fleet'] or '??') .. string.format('<br>Sample: %s', formatSampleFleet(e.sample_fleet)), |
| drums = args.explicit[id .. ' drums'] or '??', | | drums = args.explicit[id .. ' drums'] or '??', |
| fuel_cost = e.use_fuel > 0 and '-' .. 10 * e.use_fuel or '', | | fuel_cost = e.use_fuel > 0 and '-' .. 10 * e.use_fuel or '', |