• 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
Don't add static categories when no name provided
Line 14: Line 14:     
function ShipCategoriesKai:create_ship()
 
function ShipCategoriesKai:create_ship()
self._ship = Ship(self._args.name or self._args[1], self._args.model)
+
local name = self._args.name or self._args[1]
 +
if name then
 +
self._ship = Ship(name, self._args.model)
 +
end
 
end
 
end
   Line 82: Line 85:  
self._categories = {}
 
self._categories = {}
 
self:create_ship()
 
self:create_ship()
self:create_static_categories()
+
if self._ship then
self:create_type_categories()
+
self:create_static_categories()
self:create_class_categories()
+
self:create_type_categories()
--self:create_rarity_categories()
+
self:create_class_categories()
self:create_construction_categories()
+
--self:create_rarity_categories()
self:create_remodel_categories()
+
self:create_construction_categories()
self:create_stock_equipment_categories()
+
self:create_remodel_categories()
 +
self:create_stock_equipment_categories()
 +
end
 
return self:write_categories()
 
return self:write_categories()
 
end
 
end
    
return ShipCategoriesKai
 
return ShipCategoriesKai
Anonymous user

Navigation menu