• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
Separate blueprint value check into independent module
Line 118: Line 118:  
     local remodelsteel = '[[File:IcoSteel.png|18px|Steel]]'
 
     local remodelsteel = '[[File:IcoSteel.png|18px|Steel]]'
 
     local remodelammo = '[[File:IcoAmmo.png|18px|Ammo]]'
 
     local remodelammo = '[[File:IcoAmmo.png|18px|Ammo]]'
     local remodelBP = '[[File:IcoBlueprint.png|18px|Blueprint|link=Blueprints]]'
+
     local remodelblueprint = shipmodule.data[shipNum]["remodelreq"][3]
    local remodelCatapult = '[[File:IcoCatapult.png|18px|Prototype Flight Deck Catapult]]'
  −
   
   
     local remodelinfo = ''
 
     local remodelinfo = ''
 
     if shipmodule.data[shipNum]["remodelreq"] ~= "" then
 
     if shipmodule.data[shipNum]["remodelreq"] ~= "" then
Line 126: Line 124:  
         remodelammo = remodelammo .. ' ' .. shipmodule.data[shipNum]["remodelreq"][2]
 
         remodelammo = remodelammo .. ' ' .. shipmodule.data[shipNum]["remodelreq"][2]
 
         remodelinfo = remodelsteel .. ' ' .. remodelammo
 
         remodelinfo = remodelsteel .. ' ' .. remodelammo
         if shipmodule.data[shipNum]["remodelreq"][3] == 1 then
+
         if shipmodule.data[shipNum]["remodelreq"][3] ~= nil then
        remodelinfo = remodelinfo .. ' ' .. remodelBP
+
            remodelinfo = remodelinfo .. ' ' .. shipmodule.RemodelBlueprintChk(remodelblueprint)
        elseif shipmodule.data[shipNum]["remodelreq"][3] == 2 then
+
        end
        remodelinfo = remodelinfo .. ' ' .. remodelBP .. ' ' .. remodelCatapult
  −
    end
   
     end
 
     end
   Line 243: Line 239:  
end
 
end
   −
function shipmodule.KanmusuList(frame)
+
function shipmodule.RemodelBlueprintChk(blueprint) -- Remodel value check
 +
    local blueprinttext = ''
 +
    if blueprint == 1 then
 +
        blueprinttext = '[[File:IcoBlueprint.png|25px|Blueprint]]'
 +
    elseif blueprint == 2 then
 +
        blueprinttext = '[[File:IcoBlueprint.png|25px|Blueprint]] [[File:IcoCatapult.png|25px|Prototype Flight Deck Catapult]]'
 +
    end
 +
    return blueprinttext
 +
end
 +
 
 +
function shipmodule.KanmusuList(frame)
 
     local shipType = frame.args[1]
 
     local shipType = frame.args[1]
 
     local shipListTable = '<table class="wikitable filterable sortable" style="width: 100%; min-width: 800px;"><tr>'
 
     local shipListTable = '<table class="wikitable filterable sortable" style="width: 100%; min-width: 800px;"><tr>'
6,043

edits

Navigation menu