Line 6: |
Line 6: |
| local function getShipCard(ship) | | local function getShipCard(ship) |
| local s = Ship(ship) | | local s = Ship(ship) |
− | local i = s:id() or s:true_id() | + | -- local i = s:id() or s:true_id() |
− | local is = i and (i < 10 and '00' .. i or i < 100 and '0' .. i or i) or '?' | + | -- local is = i and (i < 10 and '00' .. i or i < 100 and '0' .. i or i) or '?' |
− | return '[[File:KanMusu' .. is .. 'Banner.png|160px|link=' .. s:base_name() .. ']]<br>[[' .. s:base_name() .. '|' .. s:name() .. ']]' | + | return '[[File:Ship Banner ' .. s:name() .. '.png|160px|link=' .. s:base_name() .. ']]<br>[[' .. s:base_name() .. '|' .. s:name() .. ']]' |
| end | | end |
| | | |
| local function getEquipmentCard(eq) | | local function getEquipmentCard(eq) |
− | return '[[File:Equipment' .. (Equipment(eq):id() or '?') .. '-1.png|100px|link=' .. eq .. ']]' | + | local e = Equipment(eq) |
| + | return '[[File:Equipment Card ' .. e:name():gsub("/", " ") .. '.png|100px|link=' .. e:name() .. ']]' |
| end | | end |
| | | |
Line 136: |
Line 137: |
| first = false | | first = false |
| end | | end |
− | local fleetNote = U.ijoin(fleet.notes, ', ') .. ' : ' ..fleetType .. ' (Variant ' .. i .. ')' | + | local fleetNote = U.ijoin(fleet.notes, ', ') .. ' : ' ..fleetType .. ' (Variant ' .. i .. ', ' .. (fleet.date or '??') .. '~)' |
| if fleet.f2p and fleet.f2p > 0 then | | if fleet.f2p and fleet.f2p > 0 then |
| fleetNote = fleetNote .. " '''{{color|green|{{tooltip|Regular|" .. fleet.f2p .. " samples}}}}'''" | | fleetNote = fleetNote .. " '''{{color|green|{{tooltip|Regular|" .. fleet.f2p .. " samples}}}}'''" |
Line 144: |
Line 145: |
| end | | end |
| if table.getn(fleet.voices or {}) > 0 then | | if table.getn(fleet.voices or {}) > 0 then |
− | fleetNote = fleetNote .. ' ' .. U.ijoin(U.imap(fleet.voices[1], formatVoice), ' ') | + | fleetNote = fleetNote .. ' ' .. U.ijoin(U.imap(fleet.voices, formatVoice), ' ') |
| end | | end |
| table.insert(result, string.format('|-\n!colspan="11"|%s', fleetNote)) | | table.insert(result, string.format('|-\n!colspan="11"|%s', fleetNote)) |
Line 152: |
Line 153: |
| result, | | result, |
| string.format( | | string.format( |
− | '|-\n|%s||%s||style="text-align:left;white-space:nowrap"|%s%s%s%s%s||%s||%s||%s||%s||%s', | + | '|-\n|%s||%s||style="text-align:left;white-space:nowrap"|%s%s%s%s%s%s||%s||%s||%s||%s||%s', |
| getShipCard(ship.ship), | | getShipCard(ship.ship), |
| ship.level, | | ship.level, |
Line 160: |
Line 161: |
| ship.equipment[4] and getEquipmentCard(ship.equipment[4]) or '', | | ship.equipment[4] and getEquipmentCard(ship.equipment[4]) or '', |
| ship.equipment[5] and getEquipmentCard(ship.equipment[5]) or '', | | ship.equipment[5] and getEquipmentCard(ship.equipment[5]) or '', |
| + | ship.extraSlot and string.format('<span style="display:inline-block;border-radius:10px;border:5px solid steelblue">%s</span>', getEquipmentCard(ship.extraSlot)) or '', |
| type(ship.hp) == 'table' and formatHp(ship.hp, ship.maxHp) or ship.hp ~= ship.maxHp and string.format('%s/%s', ship.hp, ship.maxHp) or | | type(ship.hp) == 'table' and formatHp(ship.hp, ship.maxHp) or ship.hp ~= ship.maxHp and string.format('%s/%s', ship.hp, ship.maxHp) or |
| ship.maxHp, | | ship.maxHp, |