Changes

no edit summary
Line 14: Line 14:  
[7] = "violet",
 
[7] = "violet",
 
[8] = "violet",
 
[8] = "violet",
 +
},
 +
_equipment_rarity_map = {
 +
[0] = "transparent",
 +
[1] = "lightgrey",
 +
[2] = "lightsteelblue",
 +
[3] = "violet",
 +
[4] = "violet",
 +
[5] = "violet",
 
},
 
},
 
_catbomb = "Catbomb.png|300px",
 
_catbomb = "Catbomb.png|300px",
Line 23: Line 31:  
_stat_1 = "%d",
 
_stat_1 = "%d",
 
_stat_2 = "%d (%d)",
 
_stat_2 = "%d (%d)",
_slot_template = [[|- align=center
+
_slot_template = [[|- align=center style="background-color: ${color};"
 
| style="width: 36px;" | ${icon}
 
| style="width: 36px;" | ${icon}
| colspan="3" | ${equipment}
+
| colspan="3" style="width: 190px;" | ${equipment}
| ${space}
+
| ${slot_size}
 
]],
 
]],
 
_image_template = "[[File:%s]]",
 
_image_template = "[[File:%s]]",
Line 49: Line 57:  
| '''${torpedo}'''
 
| '''${torpedo}'''
 
|-
 
|-
| colspan="2" style="width: 86px;" | ${evasion_icon} Evasion
+
| colspan="2" style="width: 80px;" | ${evasion_icon} Evasion
 
| style="width: 60px;" | '''${evasion}'''
 
| style="width: 60px;" | '''${evasion}'''
 
| style="width: 80px;" | ${aa_icon} AA
 
| style="width: 80px;" | ${aa_icon} AA
Line 168: Line 176:  
local slots = {}
 
local slots = {}
 
for i = 1, math.max(4, ship:slots()) do
 
for i = 1, math.max(4, ship:slots()) do
table.insert(slots, format(self._slot_template, {icon = ship:equipment_icon(i), equipment = ship:equipment(i), space = ship:space(i)}))
+
table.insert(slots, format(self._slot_template, {icon = ship:equipment_icon(i), equipment = ship:equipment(i), slot_size = ship:slot_size(i), color = ship:equipment_back(i)}))
 
end
 
end
 
return table.concat(slots)
 
return table.concat(slots)
Anonymous user