• 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 1: Line 1:  
local U = require("Module:Core")
 
local U = require("Module:Core")
local View = require("Module:View")
   
local Ship = require("Module:Ship")
 
local Ship = require("Module:Ship")
 
local Formatting = require("Module:Formatting")
 
local Formatting = require("Module:Formatting")
Line 9: Line 8:  
   {world = 2, maps = 5},
 
   {world = 2, maps = 5},
 
   {world = 3, maps = 5},
 
   {world = 3, maps = 5},
 +
  {world = 7, maps = 5},
 
   {world = 4, maps = 5},
 
   {world = 4, maps = 5},
 
   {world = 5, maps = 5},
 
   {world = 5, maps = 5},
 
   {world = 6, maps = 5},
 
   {world = 6, maps = 5},
  {world = 7, maps = 3}
  −
}
  −
  −
local rarityStyles = {
  −
  [1] = "background-color:#8ac;color:#000",
  −
  [2] = "background-color:#ace;color:#000",
  −
  [3] = "background-color:#0ff;color:#000",
  −
  [4] = "background-color:#bbb;color:#000",
  −
  [5] = "background-color:#fc0;color:#000",
  −
  [6] = "background-color:#faf;color:#000",
  −
  [7] = "background-color:#f5f;color:#000",
  −
  [8] = "background-color:#a0a;color:#000"
   
}
 
}
   Line 31: Line 19:  
   local result = {
 
   local result = {
 
     string.format(
 
     string.format(
       [=[<tr><td>[[%s]]</td><td style="%s">%s</td><td>[[%s]]</td><td>%s</td>]=],
+
       [=[<tr><td>[[%s]]</td><td%s>%s</td><td>[[%s]]</td><td>%s</td>]=],
 
       shipName,
 
       shipName,
       rarityStyles[ship:back()] or "",
+
       ship:back() and string.format(' style="background-color:%s;color:black"', Formatting:format_ship_back(ship:back())) or "",
 
       Formatting:format_ship_rarity(ship:back()),
 
       Formatting:format_ship_rarity(ship:back()),
 
       Formatting:format_ship_code(ship:type()),
 
       Formatting:format_ship_code(ship:type()),
Line 42: Line 30:  
     for map = 1, e.maps do
 
     for map = 1, e.maps do
 
       local drop = shipDropData[string.format("%d-%d", e.world, map)]
 
       local drop = shipDropData[string.format("%d-%d", e.world, map)]
       table.insert(result, string.format("<td%s>%s</td>", drop and ' style="background-color:#c8e6c9"' or "", drop and Formatting:tooltip2("", drop, "; ") or ""))
+
       table.insert(result, string.format("<td%s>%s</td>", drop and ' style="background-color:#c8e6c9"' or "", drop and Formatting:tooltip2("✔️", drop, "; ") or ""))
 
     end
 
     end
 
   end
 
   end
Line 52: Line 40:     
local function render(frame)
 
local function render(frame)
   local args = U.getTemplateArgs(frame)
+
   local args = frame.args
 
   local result = {[[<div style="overflow-x:auto"><table class="wikitable sortable" style="text-align:center;width:100%">]]}
 
   local result = {[[<div style="overflow-x:auto"><table class="wikitable sortable" style="text-align:center;width:100%">]]}
 
   table.insert(result, "<tr>")
 
   table.insert(result, "<tr>")
Line 61: Line 49:  
     table.insert(result, string.format([=[<th colspan="%s">[[World %s]]</th>]=], e.maps, e.world))
 
     table.insert(result, string.format([=[<th colspan="%s">[[World %s]]</th>]=], e.maps, e.world))
 
   end
 
   end
   table.insert(result, [[<th rowspan="2">Remarks</th>]])
+
   table.insert(result, [[<th rowspan="2">Remarks</th></tr><tr>]])
  table.insert(result, "</tr>")
  −
  table.insert(result, "<tr>")
   
   for _, e in ipairs(worlds) do
 
   for _, e in ipairs(worlds) do
 
     for map = 1, e.maps do
 
     for map = 1, e.maps do
Line 77: Line 63:  
end
 
end
   −
return { returnShipDrop = render } -- View(render, {"Nagato", "Yamato"})
+
return { returnShipDrop = render }
39,885

edits

Navigation menu