• 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 5: Line 5:  
local Ship = require("Module:Ship")
 
local Ship = require("Module:Ship")
 
local ShipGraphicKai = require('Module:ShipGraphicKai')
 
local ShipGraphicKai = require('Module:ShipGraphicKai')
 +
local ShipCardKai = require('Module:ShipCardKai')
    
-- [[Category:Todo]]: support passing Ship object in those modules, use Ship object, redo and move ship_remodel_forms function
 
-- [[Category:Todo]]: support passing Ship object in those modules, use Ship object, redo and move ship_remodel_forms function
Line 264: Line 265:  
     end
 
     end
 
     return U.concat(forms, seasonal_forms)
 
     return U.concat(forms, seasonal_forms)
 +
end
 +
 +
function cg(name, damaged, size)
 +
    format{
 +
        [[<span class="advanced-tooltip">${cg}<div class="tooltip-contents">${card}</div></span>]],
 +
        cg = ShipGraphicKai:Asset({ name, link = "nil", damaged = damaged, size = size }),
 +
        card = ShipCardKai:Asset({ name, link = "nil", damaged = damaged }),
 +
    }
 
end
 
end
   Line 299: Line 308:  
         end
 
         end
 
         if form.normal then
 
         if form.normal then
             table.insert(result, ShipGraphicKai:Asset({ form.name, link = "nil" }))
+
             table.insert(result, cg(form.name))
 
         end
 
         end
 
         if form.damaged then
 
         if form.damaged then
             table.insert(result, ShipGraphicKai:Asset({ form.name, link = "nil", damaged = true }))
+
             table.insert(result, cg(form.name, true))
 
         end
 
         end
 
     end
 
     end
Line 324: Line 333:  
             table.insert(result, "{{!}}-{{!}}" .. title .. "=")
 
             table.insert(result, "{{!}}-{{!}}" .. title .. "=")
 
             if form.normal and form.damaged then
 
             if form.normal and form.damaged then
                 local image = ShipGraphicKai:Asset({ form.name, link = "nil", size = "300px" })
+
                 local image = cg(form.name, false, "300px")
                 local image_damaged = ShipGraphicKai:Asset({ form.name, link = "nil", damaged = true, size = "300px" })
+
                 local image_damaged = cg(form.name, true, "300px")
 
                 table.insert(result, format{
 
                 table.insert(result, format{
 
                     ShipPage._gallery_tabber,
 
                     ShipPage._gallery_tabber,
Line 332: Line 341:  
                 })
 
                 })
 
             elseif form.normal then
 
             elseif form.normal then
                 local image = ShipGraphicKai:Asset({ form.name, link = "nil", size = "300px" })
+
                 local image = cg(form.name, false, "300px")
 
                 table.insert(result, format{
 
                 table.insert(result, format{
 
                     ShipPage._gallery_normal,
 
                     ShipPage._gallery_normal,
Line 338: Line 347:  
                 })
 
                 })
 
             elseif form.damaged then
 
             elseif form.damaged then
                 local image_damaged = ShipGraphicKai:Asset({ form.name, link = "nil", damaged = true, size = "300px" })
+
                 local image_damaged = cg(form.name, true, "300px")
 
                 table.insert(result, format{
 
                 table.insert(result, format{
 
                     ShipPage._gallery_damaged,
 
                     ShipPage._gallery_damaged,
cssedit, gkautomate
6,942

edits

Navigation menu