Line 24: |
Line 24: |
| function shipmodule.KanmusuInfo(frame) -- Kanmusu Info Template | | function shipmodule.KanmusuInfo(frame) -- Kanmusu Info Template |
| local shipNum = shipmodule.getIDNum(frame) | | local shipNum = shipmodule.getIDNum(frame) |
− |
| |
| local shipInfo = assert(shipmodule.data[shipNum], "KanMusu ID " .. shipNum .. " doesn't have a database entry") | | local shipInfo = assert(shipmodule.data[shipNum], "KanMusu ID " .. shipNum .. " doesn't have a database entry") |
− |
| |
| local upperTable = shipmodule.makeStatBox(frame) | | local upperTable = shipmodule.makeStatBox(frame) |
− | local DetailTable = shipmodule.EquipmentBox(frame) .. shipmodule.ModernizationBox(frame) .. shipmodule.getArtVoice(frame) | + | local DetailTable = shipmodule.EquipmentBox(frame) .. '<table style="width: 100%">' .. shipmodule.ModernizationBox(frame) .. shipmodule.getArtVoice(frame) .. '</table>' |
− | | |
| local shipInfoBox = '<div style="display: inline-block; vertical-align: top;"><table style="{{border-radius|10px 10px 10px 10px}} border: 1px solid #aaaaaa; min-width: 495px">' | | local shipInfoBox = '<div style="display: inline-block; vertical-align: top;"><table style="{{border-radius|10px 10px 10px 10px}} border: 1px solid #aaaaaa; min-width: 495px">' |
| shipInfoBox = shipInfoBox .. '<tr><td>' .. upperTable .. '</td></tr>' | | shipInfoBox = shipInfoBox .. '<tr><td>' .. upperTable .. '</td></tr>' |
| shipInfoBox = shipInfoBox .. '<tr><td>' .. DetailTable .. '</td></tr></table></div>' .. shipmodule.createCategories(frame) | | shipInfoBox = shipInfoBox .. '<tr><td>' .. DetailTable .. '</td></tr></table></div>' .. shipmodule.createCategories(frame) |
− |
| |
| return shipInfoBox | | return shipInfoBox |
| end | | end |
Line 277: |
Line 273: |
| | | |
| local remodelinfo = '' | | local remodelinfo = '' |
− | if shipInfo["remodelreq"] ~= "" then | + | if shipInfo.remodelreq and shipInfo.remodelreq ~= '' then |
− | local steel = '[[File:IcoSteel.png|18px|Steel]] ' .. shipInfo["remodelreq"][1] | + | remodelinfo = string.format('[[File:IcoSteel.png|18px|Steel]] %d [[File:IcoAmmo.png|18px|Ammo]] %d', shipInfo.remodelreq[1], shipInfo.remodelreq[2]) |
− | local ammo = '[[File:IcoAmmo.png|18px|Ammo]] ' .. shipInfo["remodelreq"][2]
| + | if shipInfo.remodelbp then |
− | remodelinfo = steel .. ' ' .. ammo | + | remodelinfo = remodelinfo .. ' ' .. string.format('[[File:IcoBlueprint.png|25px|Blueprint|link=Blueprints]] %d', shipInfo.remodelbp) |
− | local items = shipmodule.RemodelBlueprintChk(shipInfo["remodelreq"][3], shipNum) | + | end |
− | if items then | + | if shipInfo.remodelcatapult then |
− | remodelinfo = remodelinfo .. ' ' .. items
| + | remodelinfo = remodelinfo .. ' ' .. string.format('[[File:IcoCatapult.png|25px|Prototype Flight Deck Catapult]] %d', shipInfo.remodelcatapult) |
| + | end |
| + | if shipInfo.remodelar then |
| + | remodelinfo = remodelinfo .. ' ' .. string.format('[[File:IcoActionReport.png|25px|Action Report]] %d', shipInfo.remodelar) |
| end | | end |
− | if shipInfo.remodeldevmat or shipInfo.remodelconmat then | + | if shipInfo.remodeldevmat or shipInfo.remodelconmat or shipInfo.remodelgunmat or shipInfo.remodelairmat then |
| remodelinfo = remodelinfo .. '<br>' | | remodelinfo = remodelinfo .. '<br>' |
| end | | end |
Line 293: |
Line 292: |
| if shipInfo.remodelconmat then | | if shipInfo.remodelconmat then |
| remodelinfo = remodelinfo .. ' ' .. string.format('[[File:IcoConmat.png|18px|Construction Material]] %d', shipInfo.remodelconmat) | | remodelinfo = remodelinfo .. ' ' .. string.format('[[File:IcoConmat.png|18px|Construction Material]] %d', shipInfo.remodelconmat) |
| + | end |
| + | if shipInfo.remodelgunmat then |
| + | remodelinfo = remodelinfo .. ' ' .. string.format('[[File:IcoGunmat.png|18px|New Model Gun Mount Improvement Material]] %d', shipInfo.remodelgunmat) |
| + | end |
| + | if shipInfo.remodelairmat then |
| + | remodelinfo = remodelinfo .. ' ' .. string.format('[[File:IcoAirmat.png|18px|New Model Aerial Armament Material]] %d', shipInfo.remodelairmat) |
| end | | end |
| end | | end |
Line 334: |
Line 339: |
| end | | end |
| local row13 = '<tr>' .. RscHeader .. 'Modernization</th>' .. RscData2 .. modInfo .. '</td></tr>' | | local row13 = '<tr>' .. RscHeader .. 'Modernization</th>' .. RscData2 .. modInfo .. '</td></tr>' |
− | return '<table style="width: 100%">' .. row13 .. row11 .. row12 .. '</table>' | + | -- return '<table style="width: 100%">' .. row13 .. row11 .. row12 .. '</table>' |
| + | return row13 .. row11 .. row12 |
| end | | end |
| | | |
| function shipmodule.getArtVoice(frame) | | function shipmodule.getArtVoice(frame) |
| local shipNum = shipmodule.getIDNum(frame) | | local shipNum = shipmodule.getIDNum(frame) |
− |
| |
| local shipInfo = assert(shipmodule.data[shipNum], "KanMusu ID " .. shipNum .. " doesn't have a database entry") | | local shipInfo = assert(shipmodule.data[shipNum], "KanMusu ID " .. shipNum .. " doesn't have a database entry") |
− | -- Artist & Voice Info
| |
| local RscHeader = '<th style="width: 25%; white-space: nowrap; {{border-radius|12px 4px 4px 12px}} background-color: #3baef5; color: #ffffff; padding-left: 5px; padding-right: 5px; text-align: right;">' | | local RscHeader = '<th style="width: 25%; white-space: nowrap; {{border-radius|12px 4px 4px 12px}} background-color: #3baef5; color: #ffffff; padding-left: 5px; padding-right: 5px; text-align: right;">' |
| local RscData = '<td style="width: 25%; white-space: nowrap; text-align: center;">' | | local RscData = '<td style="width: 25%; white-space: nowrap; text-align: center;">' |
− |
| |
| local illustrator = '' | | local illustrator = '' |
| local voiceactor = '' | | local voiceactor = '' |
| if shipmodule.data[shipNum]["artist"] ~= "Unknown" and shipmodule.data[shipNum]["artist"] ~= "" then | | if shipmodule.data[shipNum]["artist"] ~= "Unknown" and shipmodule.data[shipNum]["artist"] ~= "" then |
| illustrator = '[[:Category:' .. shipmodule.data[shipNum]["artist"] .. '|' .. shipmodule.data[shipNum]["artist"] .. ']]' | | illustrator = '[[:Category:' .. shipmodule.data[shipNum]["artist"] .. '|' .. shipmodule.data[shipNum]["artist"] .. ']]' |
− | --cat = cat .. '[[Category:' .. shipmodule.data[shipNum]["artist"] .. ']]'
| |
| else | | else |
| illustrator = 'Unknown' | | illustrator = 'Unknown' |
Line 356: |
Line 358: |
| if shipmodule.data[shipNum]["seiyuu"] ~= "Unknown" and shipmodule.data[shipNum]["seiyuu"] ~= "" then | | if shipmodule.data[shipNum]["seiyuu"] ~= "Unknown" and shipmodule.data[shipNum]["seiyuu"] ~= "" then |
| voiceactor = '[[:Category:' .. shipmodule.data[shipNum]["seiyuu"] .. '|' .. shipmodule.data[shipNum]["seiyuu"] .. ']]' | | voiceactor = '[[:Category:' .. shipmodule.data[shipNum]["seiyuu"] .. '|' .. shipmodule.data[shipNum]["seiyuu"] .. ']]' |
− | --cat = cat .. '[[Category:' .. shipmodule.data[shipNum]["seiyuu"] .. ']]'
| |
| else | | else |
| voiceactor = 'Unknown' | | voiceactor = 'Unknown' |
| end | | end |
| voice = RscHeader .. 'Seiyuu</th>' .. RscData .. voiceactor .. '</td>' | | voice = RscHeader .. 'Seiyuu</th>' .. RscData .. voiceactor .. '</td>' |
− | local row14 = '<table style="width: 100%">' .. art .. voice .. '</table>' | + | --local row14 = '<table style="width: 100%">' .. art .. voice .. '</table>' |
− | return row14 | + | return art .. voice |
| end | | end |
| | | |