• 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 189: Line 189:  
local equipment, size, icon, color
 
local equipment, size, icon, color
 
if i > num_of_slots then
 
if i > num_of_slots then
equipment, size, icon, color = "- Locked -", "-", Formatting:format_image(Formatting:format_equipment_icon(false)), self._equipment_rarity_map[0]
+
equipment, size, icon, color = "- Locked -", "-", "", 0
 
else
 
else
 
equipment, size = ship:slot(i)
 
equipment, size = ship:slot(i)
icon = Formatting:format_image(Formatting:format_equipment_icon(equipment:type()))
+
if equipment then
color = self._equipment_rarity_map[equipment:back()]
+
icon = equipment:type()
equipment = Formatting:format_link(equipment:link())
+
color = equipment:back()
 +
equipment = Formatting:format_link(equipment:link())
 +
else
 +
icon = false
 +
color = 0
 +
equipment = "- Unequipped -"
 +
end
 +
icon = Formatting:format_image(Formatting:format_equipment_icon(icon))
 
end
 
end
 +
color = self._equipment_rarity_map[color]
 
table.insert(slots, format{self._slot_template, icon = icon, equipment = equipment, slot_size = size, color = color})
 
table.insert(slots, format{self._slot_template, icon = icon, equipment = equipment, slot_size = size, color = color})
 
end
 
end
Anonymous user

Navigation menu