• 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 9: Line 9:  
local ShipInfoKai = require("Module:ShipInfoKai")
 
local ShipInfoKai = require("Module:ShipInfoKai")
 
local ShipCategoriesKai = require("Module:ShipCategoriesKai")
 
local ShipCategoriesKai = require("Module:ShipCategoriesKai")
 +
 +
-- can't use Ship:reversible() normally for some reason
 +
local reversible_forms = {}
    
function ship_remodel_forms(ship_name, ship_suffix, j)
 
function ship_remodel_forms(ship_name, ship_suffix, j)
 
     j = j or 1
 
     j = j or 1
 
     ship_suffix = ship_suffix or ""
 
     ship_suffix = ship_suffix or ""
     local forms = { ship_name .. "/" .. ship_suffix }
+
     local form = ship_name .. "/" .. ship_suffix
 +
    local forms = { form }
 
     local success, ship_data = Utils.requireModule(ship_name)
 
     local success, ship_data = Utils.requireModule(ship_name)
 
     if not success then
 
     if not success then
Line 21: Line 25:  
     local i = 0
 
     local i = 0
 
     while form_data and form_data._remodel_to and not Utils.find(forms, form_data._remodel_to) and i < 10 and j <= 3 do
 
     while form_data and form_data._remodel_to and not Utils.find(forms, form_data._remodel_to) and i < 10 and j <= 3 do
 +
        if form_data._reversible then
 +
            reversible_forms[form] = true
 +
        end
 
         local ship_name_next, ship_suffix_next = Ship:process_ship_key(form_data._remodel_to)
 
         local ship_name_next, ship_suffix_next = Ship:process_ship_key(form_data._remodel_to)
 
         if ship_name_next ~= ship_name then
 
         if ship_name_next ~= ship_name then
Line 65: Line 72:  
         table.insert(infoboxes, format{
 
         table.insert(infoboxes, format{
 
             self._ship_infobox,
 
             self._ship_infobox,
             title = self._ship_infobox_titles[i],
+
             title = (self._ship_infobox_titles[i] or "?") .. (reversible_forms[form] and " (Reversible)" or ""),
 
             infobox = ShipInfoKai:Infobox({ form })
 
             infobox = ShipInfoKai:Infobox({ form })
 
         })
 
         })
cssedit, gkautomate
7,060

edits

Navigation menu