• 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
m
no edit summary
Line 460: Line 460:     
local function renderCategories(ship)
 
local function renderCategories(ship)
   local categories = "[[Category:Ships]][[Category:" .. ship["class"] .. "]][[Category:" .. ship["type"] .. "s]]"
+
   local categories = "[[Category:Ships]]"
 +
  if notNil(ship["class"]) then
 +
  categories = categories .. "[[Category:" .. ship["class"] .. "]]"
 +
  end
 +
  if notNil(ship["type"]) then
 +
  categories = categories .. "[[Category:" .. ship["type"] .. "s]]"
 +
  end
 
   if ship["artist"] ~= "Unknown" and ship["artist"] ~= "" then
 
   if ship["artist"] ~= "Unknown" and ship["artist"] ~= "" then
 
     categories = categories .. "[[Category:" .. ship["artist"] .. "]]"
 
     categories = categories .. "[[Category:" .. ship["artist"] .. "]]"
Line 609: Line 615:  
   local ship = Ship(shipsById[(U.find(shipsByNo, ShipData[key] or key, "name") or {}).id] or key)
 
   local ship = Ship(shipsById[(U.find(shipsByNo, ShipData[key] or key, "name") or {}).id] or key)
 
   local data = {}
 
   local data = {}
   data.id = ship:id() or '???'
+
   data.id = ship:id() or "??"
 
   data.no = ship:true_id()
 
   data.no = ship:true_id()
 
   data.name = {ship:japanese_name() or "", ship:reading() or "", ship:name() or ""}
 
   data.name = {ship:japanese_name() or "", ship:reading() or "", ship:name() or ""}
 
   local class = ship:class()
 
   local class = ship:class()
   data.class = class and class:name() or "???"
+
   data.class = class and class:name() or "??"
 
   data.display_class = ship._display_class
 
   data.display_class = ship._display_class
 
   data.type = ship:formatted_type() or ""
 
   data.type = ship:formatted_type() or ""
7,212

edits

Navigation menu