Line 9: |
Line 9: |
| _item_class = Ship, | | _item_class = Ship, |
| _equip_class = Equipment, | | _equip_class = Equipment, |
− | _equip_bg = "whitesmoke", | + | _equip_icon_bg = "#8DCDEE", |
| + | _equip_bg = "#E4F3FB", |
| + | _equip_locked_bg = "#CDDBE2", |
| + | _extra_cells_bg = "#98D2F0", |
| + | _table_start = [[{|]], |
| _header_template = nil, | | _header_template = nil, |
− | _calculated_cell_template = [[| colspan="6" style="background: #FFE6E6; text-align: center; font-weight: bold;" |Effective Line of Sight: ${elos} // Fighter Power: ${fighter_power}]], | + | _calculated_cell_template = [[| colspan="6" style="background: ${bg_color}; text-align: center; font-weight: bold;" |Effective Line of Sight: ${elos} // Fighter Power: ${fighter_power}]], |
− | _route_cell_template = [[| colspan="6" style="background: #FFE6E6; text-align: center; font-weight: bold;" |Route Taken: ${route}]], | + | _route_cell_template = [[| colspan="6" style="background: ${bg_color}; text-align: center; font-weight: bold;" |Route Taken: ${route}]], |
| _column_cell_templates = { | | _column_cell_templates = { |
| ship = [[| rowspan="4" style="background: white;" |${values.ship_card}]], | | ship = [[| rowspan="4" style="background: white;" |${values.ship_card}]], |
− | equips = [[| style="background: #FFE6E6; width: 15px;" |${values.equip_icon} | + | equips = [[| style="background: ${values.icon_bg_color}; width: 15px;" |${values.equip_icon} |
− | | style="background: #F5FFFF; width: 175px;text-align: center;" |${values.equip_link}]], | + | | style="background: ${values.equip_bg_color}; width: 175px;text-align: center;" |${values.equip_link}]], |
| ship2 = [[| rowspan="4" style="background: white;" |${values.ship_card}]], | | ship2 = [[| rowspan="4" style="background: white;" |${values.ship_card}]], |
− | equips2 = [[| style="background: #FFE6E6; width: 15px;" |${values.equip_icon} | + | equips2 = [[| style="background: ${values.icon_bg_color}; width: 15px;" |${values.equip_icon} |
− | | style="background: #F5FFFF; width: 175px; text-align: center;" |${values.equip_link}]] | + | | style="background: ${values.equip_bg_color}; width: 175px; text-align: center;" |${values.equip_link}]] |
| }, | | }, |
| _columns = { | | _columns = { |
Line 67: |
Line 71: |
| | | |
| function NanaminFleet:equips(row) | | function NanaminFleet:equips(row) |
− | local value, icon | + | local value, icon, equip_bg_color |
| if row[2] == false then | | if row[2] == false then |
| value = "- Unequipped -" | | value = "- Unequipped -" |
| icon = "" | | icon = "" |
| + | equip_bg_color = self._equip_bg |
| elseif row[2] == "locked" then | | elseif row[2] == "locked" then |
| value = "- Locked -" | | value = "- Locked -" |
| icon = "" | | icon = "" |
| + | equip_bg_color = self._equip_locked_bg |
| else | | else |
| value = Formatting:format_link(row[2]:link()) | | value = Formatting:format_link(row[2]:link()) |
| icon = Formatting:format_image{Formatting:format_equipment_icon(row[2]:icon()), size = "22x22px"} | | icon = Formatting:format_image{Formatting:format_equipment_icon(row[2]:icon()), size = "22x22px"} |
| + | equip_bg_color = self._equip_bg |
| end | | end |
− | return {values = {equip_link = value, equip_icon = icon}, bg_color = self._equip_bg, text_align = self._center_align} | + | return {values = {equip_link = value, equip_icon = icon, icon_bg_color = self._equip_icon_bg, equip_bg_color = equip_bg_color}, bg_color = self._equip_bg, text_align = self._center_align} |
| end | | end |
| | | |
Line 236: |
Line 243: |
| table.insert(self._rows, format{self._calculated_cell_template, | | table.insert(self._rows, format{self._calculated_cell_template, |
| elos = string.format("%.2f", self._elos - (self._hq_lvl * 0.61)), | | elos = string.format("%.2f", self._elos - (self._hq_lvl * 0.61)), |
− | fighter_power = self._fighter_power | + | fighter_power = self._fighter_power, |
| + | bg_color = self._extra_cells_bg |
| }) | | }) |
| table.insert(self._rows, self._row_starter) | | table.insert(self._rows, self._row_starter) |
| table.insert(self._rows, format{self._route_cell_template, | | table.insert(self._rows, format{self._route_cell_template, |
− | route = self._route | + | route = self._route, |
| + | bg_color = self._extra_cells_bg |
| }) | | }) |
| end | | end |