Line 259: |
Line 259: |
| function shipmodule.ModernizationBox(frame) | | function shipmodule.ModernizationBox(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") |
| | | |
Line 270: |
Line 269: |
| local constrdata = '' | | local constrdata = '' |
| | | |
− | if shipmodule.data[shipNum]["remodellv"] ~= nil and shipmodule.data[shipNum]["remodellv"] ~= "" then | + | if shipInfo["remodellv"] ~= nil and shipInfo["remodellv"] ~= "" then |
| constrheader = 'Remodel Level' | | constrheader = 'Remodel Level' |
− | constrdata = shipmodule.data[shipNum]["remodellv"] | + | constrdata = shipInfo["remodellv"] |
| else | | else |
| constrheader = 'Build Time' | | constrheader = 'Build Time' |
− | if shipmodule.data[shipNum]["buildtime"] == nil or shipmodule.data[shipNum]["buildtime"] == "" then | + | if shipInfo["buildtime"] == nil or shipInfo["buildtime"] == "" then |
| constrdata = 'Not Buildable' | | constrdata = 'Not Buildable' |
| else | | else |
− | constrdata = shipmodule.data[shipNum]["buildtime"] | + | constrdata = shipInfo["buildtime"] |
| end | | end |
| end | | end |
| | | |
| local remodelinfo = '' | | local remodelinfo = '' |
− | if shipmodule.data[shipNum]["remodelreq"] ~= "" then | + | if shipInfo["remodelreq"] ~= "" then |
− | local steel = '[[File:IcoSteel.png|18px|Steel]] ' .. shipmodule.data[shipNum]["remodelreq"][1] | + | local steel = '[[File:IcoSteel.png|18px|Steel]] ' .. shipInfo["remodelreq"][1] |
− | local ammo = '[[File:IcoAmmo.png|18px|Ammo]] ' .. shipmodule.data[shipNum]["remodelreq"][2] | + | local ammo = '[[File:IcoAmmo.png|18px|Ammo]] ' .. shipInfo["remodelreq"][2] |
| remodelinfo = steel .. ' ' .. ammo | | remodelinfo = steel .. ' ' .. ammo |
− | local items = shipmodule.RemodelBlueprintChk(shipmodule.data[shipNum]["remodelreq"][3], shipNum) | + | local items = shipmodule.RemodelBlueprintChk(shipInfo["remodelreq"][3], shipNum) |
| if items then | | if items then |
| remodelinfo = remodelinfo .. ' ' .. items | | remodelinfo = remodelinfo .. ' ' .. items |
| + | end |
| + | if shipInfo.remodeldevmat or shipInfo.remodelconmat then |
| + | remodelinfo = remodelinfo .. '<br>' |
| + | end |
| + | if shipInfo.remodeldevmat then |
| + | remodelinfo = remodelinfo .. ' ' .. string.format('[[File:IcoDevmat.png|18px|Development Material]] %d', shipInfo.remodeldevmat) |
| + | end |
| + | if shipInfo.remodelconmat then |
| + | remodelinfo = remodelinfo .. ' ' .. string.format('[[File:IcoConmat.png|18px|Construction Material]] %d', shipInfo.remodelconmat) |
| end | | end |
| end | | end |
− | | + | |
| -- Construction & Remodel | | -- Construction & Remodel |
| local row11 = '' | | local row11 = '' |
Line 302: |
Line 310: |
| | | |
| -- Consumption | | -- Consumption |
− | local consfuel = '[[File:IcoFuel.png|18px|Fuel]] ' .. shipmodule.data[shipNum]["consumption"][1] | + | local consfuel = '[[File:IcoFuel.png|18px|Fuel]] ' .. shipInfo["consumption"][1] |
− | local consammo = '[[File:IcoAmmo.png|18px|Ammo]] ' .. shipmodule.data[shipNum]["consumption"][2] | + | local consammo = '[[File:IcoAmmo.png|18px|Ammo]] ' .. shipInfo["consumption"][2] |
| | | |
| local row12 = '<tr>' .. RscHeader .. 'Consumption</th>' .. RscData .. consfuel .. ' ' .. consammo .. '</td>' | | local row12 = '<tr>' .. RscHeader .. 'Consumption</th>' .. RscData .. consfuel .. ' ' .. consammo .. '</td>' |
| | | |
| -- Scrap Info | | -- Scrap Info |
− | local scrapfuel = '[[File:IcoFuel.png|18px|Fuel]] ' .. shipmodule.data[shipNum]["dismantle"][1] | + | local scrapfuel = '[[File:IcoFuel.png|18px|Fuel]] ' .. shipInfo["dismantle"][1] |
− | local scrapammo = '[[File:IcoAmmo.png|18px|Ammo]] ' .. shipmodule.data[shipNum]["dismantle"][2] | + | local scrapammo = '[[File:IcoAmmo.png|18px|Ammo]] ' .. shipInfo["dismantle"][2] |
− | local scrapsteel = '[[File:IcoSteel.png|18px|Steel]] ' .. shipmodule.data[shipNum]["dismantle"][3] | + | local scrapsteel = '[[File:IcoSteel.png|18px|Steel]] ' .. shipInfo["dismantle"][3] |
− | local scrapbauxite = '[[File:IcoBauxite.png|18px|Bauxite]] ' .. shipmodule.data[shipNum]["dismantle"][4] | + | local scrapbauxite = '[[File:IcoBauxite.png|18px|Bauxite]] ' .. shipInfo["dismantle"][4] |
| local scrapinfo = scrapfuel .. ' ' .. scrapammo .. ' ' .. scrapsteel .. ' ' .. scrapbauxite | | local scrapinfo = scrapfuel .. ' ' .. scrapammo .. ' ' .. scrapsteel .. ' ' .. scrapbauxite |
| local row12 = row12 .. RscHeader .. 'Dismantle</th>' .. RscData .. scrapinfo .. '</td></tr>' | | local row12 = row12 .. RscHeader .. 'Dismantle</th>' .. RscData .. scrapinfo .. '</td></tr>' |
| | | |
| -- Modernization | | -- Modernization |
− | local modFP = '[[File:IcoAtkRemodel.png|25px|Firepower]] ' .. shipmodule.data[shipNum]["modernization"][1] | + | local modFP = '[[File:IcoAtkRemodel.png|25px|Firepower]] ' .. shipInfo["modernization"][1] |
− | local modTorp = '[[File:IcoTorpedoRemodel.png|25px|Torpedo]] ' .. shipmodule.data[shipNum]["modernization"][2] | + | local modTorp = '[[File:IcoTorpedoRemodel.png|25px|Torpedo]] ' .. shipInfo["modernization"][2] |
− | local modAA = '[[File:IcoAARemodel.png|25px|Anti-Air]] ' .. shipmodule.data[shipNum]["modernization"][3] | + | local modAA = '[[File:IcoAARemodel.png|25px|Anti-Air]] ' .. shipInfo["modernization"][3] |
− | local modArmor = '[[File:IcoArmorRemodel.png|25px|Armor]] ' .. shipmodule.data[shipNum]["modernization"][4] | + | local modArmor = '[[File:IcoArmorRemodel.png|25px|Armor]] ' .. shipInfo["modernization"][4] |
| local modLuck = '' | | local modLuck = '' |
− | if shipmodule.data[shipNum]["modernization"][5] ~= nil and shipmodule.data[shipNum]["modernization"][5] ~= "" then | + | if shipInfo["modernization"][5] ~= nil and shipInfo["modernization"][5] ~= "" then |
− | -- modLuck = '[[File:IcoLuck|18px|Luck]] ' .. shipmodule.data[shipNum]["modernization"][5] | + | -- modLuck = '[[File:IcoLuck|18px|Luck]] ' .. shipInfo["modernization"][5] |
− | modLuck = '[[File:IcoLuckRemodel.png|25px|Luck]] ' .. shipmodule.data[shipNum]["modernization"][5] -- Just a placeholder | + | modLuck = '[[File:IcoLuckRemodel.png|25px|Luck]] ' .. shipInfo["modernization"][5] -- Just a placeholder |
| end | | end |
| | | |