• 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 11: Line 11:     
function EquipmentCategoriesKai:Categories(args)
 
function EquipmentCategoriesKai:Categories(args)
return self{
+
return self{_args = args}:get_categories()
_args = args
  −
}:get_categories()
   
end
 
end
   Line 45: Line 43:     
-- Chocolatecravinghobo's makeshift temporary hardcode section till something better replaces it and/or the equipment categories rework happens  
 
-- Chocolatecravinghobo's makeshift temporary hardcode section till something better replaces it and/or the equipment categories rework happens  
  −
function EquipmentCategoriesKai:create_icon_categories() --CCH
  −
local equipment_icon = self._equipment:icon()
  −
if equipment_icon == 16 then
  −
table.insert(self._categories, format{"Category:High-angle Guns"})
  −
elseif equipment_icon == 45 then
  −
table.insert(self._categories, format{"Category:Night Fighter Aircraft"})
  −
elseif equipment_icon == 46 then
  −
table.insert(self._categories, format{"Category:Night Torpedo Bombers"})
  −
elseif equipment_icon == 47 then
  −
table.insert(self._categories, format{"Category:Land-based Patrol Aircraft"})
  −
elseif equipment_icon == 48 then
  −
table.insert(self._categories, format{"Category:Land-based Assault Aircraft"})
  −
elseif equipment_icon == 50 then
  −
table.insert(self._categories, format{"Category:Night Recon Seaplanes"})
  −
end
  −
end
      
function EquipmentCategoriesKai:create_stat_categories() --Tried to utilise  Formatting:format_equipment_types from Module:Formatting  and  eq_group from Module:EquipmentInfoKai  but couldn't figure it out
 
function EquipmentCategoriesKai:create_stat_categories() --Tried to utilise  Formatting:format_equipment_types from Module:Formatting  and  eq_group from Module:EquipmentInfoKai  but couldn't figure it out
Line 88: Line 69:  
table.insert(self._categories, format{"Category:Items"})
 
table.insert(self._categories, format{"Category:Items"})
 
elseif equipment_type == 7 or equipment_type == 8 or equipment_type == 10 or equipment_type == 11 or equipment_type == 25 or equipment_type == 26 or equipment_icon == 47 then
 
elseif equipment_type == 7 or equipment_type == 8 or equipment_type == 10 or equipment_type == 11 or equipment_type == 25 or equipment_type == 26 or equipment_icon == 47 then
if equipment_type == 25 then
  −
local equipment_id = self._equipment:id()
  −
if equipment_id == 326 or equipment_id == 327 then
  −
table.insert(self._categories, format{"Category:Helicopters"})
  −
end
  −
end
   
local asw = self._equipment:asw()
 
local asw = self._equipment:asw()
 
if asw and asw >= 7 then
 
if asw and asw >= 7 then
Line 144: Line 119:  
self:create_static_categories()
 
self:create_static_categories()
 
self:create_type_categories()
 
self:create_type_categories()
self:create_icon_categories() --CCH
   
self:create_stat_categories() --CCH
 
self:create_stat_categories() --CCH
 
--self:create_rarity_categories()
 
--self:create_rarity_categories()
cssedit, gkautomate
7,064

edits

Navigation menu