Changes
no edit summary
end
end
for i = 1, slots_to_show do
for i = 1, slots_to_show do
local equipment, size, icon, color
local equipment, size, icon, color, equipment_type
if num_of_slots and i > num_of_slots then
if num_of_slots and i > num_of_slots then
equipment, size, icon, color = "- Locked -", "-", "", 0
equipment, size, icon, color, equipment_type = "- Locked -", "-", "", 0, false
else
else
equipment, size = ship:slot(i)
equipment, size = ship:slot(i)
color = equipment:back()
color = equipment:back()
equipment = Formatting:format_link(equipment:link())
equipment = Formatting:format_link(equipment:link())
equipment_type = equipment:type()
else
else
icon = false
icon = false
color = 0
color = 0
equipment = equipment == false and "- Unequipped -" or Formatting:format_stat(equipment)
equipment = equipment == false and "- Unequipped -" or Formatting:format_stat(equipment)
equipment_type = false
end
end
icon = Formatting:format_image{Formatting:format_equipment_icon(icon), caption = Formatting:format_equipment_type(equipment:type())}
icon = Formatting:format_image{Formatting:format_equipment_icon(icon), caption = Formatting:format_equipment_type(equipment_type)}
end
end
table.insert(slots, format{self._slot_template, icon = icon, equipment = equipment, slot_size = Formatting:format_stat(size), color = Formatting:format_equipment_back(color), extra_style = Formatting:extra_style_background_image(false, color >= 4)})
table.insert(slots, format{self._slot_template, icon = icon, equipment = equipment, slot_size = Formatting:format_stat(size), color = Formatting:format_equipment_back(color), extra_style = Formatting:extra_style_background_image(false, color >= 4)})