• 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 421: Line 421:  
   end
 
   end
 
   return categories
 
   return categories
 +
end
 +
 +
local ShipData = mw.loadData("Module:Data/Ship")
 +
local shipsByNo = mw.loadData("Module:Collection/ShipsByNo")
 +
local shipsById = mw.loadData("Module:Collection/ShipsByApiId")
 +
 +
local Ship = require("Module:Ship")
 +
 +
local function loadShipData(ship)
 +
  local shipName = ship.name[3]
 +
  local shipKey = shipsById[(U.find(shipsByNo, shipName, "name") or {}).id] or "???"
 +
  local success, shipData = Ship(shipKey)
 +
  if not success then
 +
    return
 +
  end
 +
  ship.name = {shipData._japanese_name or "??", shipData._reading or "??", shipData:name() or "??"}
 +
  -- ship.class = "Independence"
 +
  -- ship.type = "Light Carrier"
 +
  -- ship.rarity = 5
 +
  -- ship.hp = {31, 41}
 +
  -- ship.fp = {14, 32}
 +
  -- ship.armor = {14, 30}
 +
  -- ship.torpedo = 0
 +
  -- ship.evasion = {22, 43}
 +
  -- ship.aa = {32, 52}
 +
  -- ship.aircraft = {23, 7, 2}
 +
  -- ship.asw = {16, 52}
 +
  -- ship.spd = "Fast"
 +
  -- ship.los = {40, 68}
 +
  -- ship.range = "Medium"
 +
  -- ship.luck = {27, 87}
 +
  -- ship.equip = {"TBF", "SBD-5", ""}
 +
  -- ship.artist = ""
 +
  -- ship.seiyuu = ""
 +
  -- ship.buildtime = {70, false, false}
 +
  -- ship.remodellv = ""
 +
  -- ship.consumption = {35, 40}
 +
  -- ship.remodelreq = ""
 +
  -- ship.dismantle = {3, 4, 14, 4}
 +
  -- ship.modernization = {0, 0, 3, 2}
 
end
 
end
    
local function render(frame)
 
local function render(frame)
  local ShipData = mw.loadData("Module:Data/Ship")
   
   local shipNum = frame.args[1]
 
   local shipNum = frame.args[1]
 
   local ship = ShipData[shipNum]
 
   local ship = ShipData[shipNum]
 +
  -- loadShipData(ship)
 
   return '<div style="display:inline-block;vertical-align:top"><table style="{{border-radius|10px 10px 10px 10px}} border:1px solid #aaaaaa;min-width:495px"><tr><td>' ..
 
   return '<div style="display:inline-block;vertical-align:top"><table style="{{border-radius|10px 10px 10px 10px}} border:1px solid #aaaaaa;min-width:495px"><tr><td>' ..
 
     renderStats(ship, shipNum) ..
 
     renderStats(ship, shipNum) ..
cssedit, gkautomate
6,916

edits

Navigation menu