• 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 2: Line 2:  
local Formatting = require('Module:Formatting')
 
local Formatting = require('Module:Formatting')
 
local Equipment = require('Module:Equipment')
 
local Equipment = require('Module:Equipment')
 
+
local EquipmentTypesPlural = require('Module:EquipmentTypesPlural')
 
local format = require('Module:Core').format
 
local format = require('Module:Core').format
   Line 26: Line 26:  
table.insert(self._categories, "Category:Player equipment")
 
table.insert(self._categories, "Category:Player equipment")
 
end
 
end
 +
 +
local type_names = {
 +
EquipmentTypesPlural.broad_type,
 +
EquipmentTypesPlural.gallery_type,
 +
EquipmentTypesPlural, -- exact_type
 +
EquipmentTypesPlural.icon_type,
 +
-- EquipmentTypesPlural.aircraft_type,
 +
}
    
function EquipmentCategoriesKai:create_type_categories()
 
function EquipmentCategoriesKai:create_type_categories()
local equipment_type = self._equipment:type()
+
for i, type in ipairs(self._equipment:types() or {}) do
if equipment_type then
+
local type_name = type_names[i] and type_names[i][type]
table.insert(self._categories, format{self._type_category_template, equipment_type = Formatting:format_equipment_type_plural(equipment_type)})
+
if type_name then
 +
table.insert(self._categories, format{self._type_category_template, equipment_type = type_name})
 +
end
 
end
 
end
--if equipment_type == 3 or equipment_type == 38 then --Disabled due to being too outdated/legacy
  −
-- local fit_group = self._equipment:gun_fit_group()
  −
-- if fit_group then
  −
-- table.insert(self._categories, format{self._gun_fit_group_template, fit_group = fit_group})
  −
-- end
  −
--end
   
end
 
end
  
cssedit, gkautomate
6,928

edits

Navigation menu