• 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
no edit summary
Line 506: Line 506:  
     strings = strings .. '<td style="text-align: center;">' .. shipmodule.data[id]["consumption"][2] .. '</td></tr>'
 
     strings = strings .. '<td style="text-align: center;">' .. shipmodule.data[id]["consumption"][2] .. '</td></tr>'
 
     return strings
 
     return strings
 +
end
 +
 +
local function numToID(num)
 +
return num < 10 and "00" .. num or num < 100 and "0" .. num or tostring(num)
 +
end
 +
 +
function shipmodule.CardList()
 +
firstID = 1
 +
maxID = -1
 +
for KanMusuID, KanMusuData in pairs(shipmodule.data) do
 +
if tonumber(KanMusuID) ~= nil and tonumber(KanMusuID) > maxID then
 +
maxID = tonumber(KanMusuID)
 +
end
 +
end
 +
IDRange = math.ceil(maxID / 10) * 10
 +
wikipage = ""
 +
while firstID < IDRange do
 +
wikipage = wikipage .. "<h2>No. " .. tostring(firstID) .. "-" .. tostring(firstID+9) .. "</h2>"
 +
for i = 0, 9 do
 +
x = firstID + i
 +
shipID = numToID(x)
 +
if shipmodule.data[shipID] == nil then
 +
wikipage = wikipage .. "[[File:blank.png|150px]]"
 +
else
 +
wikipage = wikipage .. "[[File:KanMusu" .. shipID .. "Card.png|150px|link=" .. database.getWikiPage(shipID) .. "]]"
 +
end
 +
if x % 5 == 0 then
 +
wikipage = wikipage .. "<br>"
 +
end
 +
end
 +
wikipage = wikipage .. "<br>"
 +
firstID = firstID + 10
 +
end
 +
return wikipage
 
end
 
end
    
return shipmodule
 
return shipmodule
cssedit, gkautomate
7,064

edits

Navigation menu