Line 7: |
Line 7: |
| local format = require('Module:Core').format | | local format = require('Module:Core').format |
| | | |
− | -- [[Category:Todo]]: hardcoded icons | + | -- [[Category:Todo]]: hardcoded iconsClasses |
| local EquipmentListKai = BaseTable{ | | local EquipmentListKai = BaseTable{ |
| _item_class = Equipment, | | _item_class = Equipment, |
− | _table_start = [[{| class="wikitable typography-xl-optout" style="width: -moz-fit-content; width: -webkit-fit-content; width: fit-content; text-align: center;"]], | + | _table_start = [[{| class="wikitable"]], |
| _header_template = [=[! No. | | _header_template = [=[! No. |
| ! Rarity | | ! Rarity |
− | ! style="width: 240px" | Name | + | ! style="width:240px" | Name |
− | ! style="width: 120px" | Type | + | ! style="width:120px" | Equipment Type |
| ${stat_columns} | | ${stat_columns} |
− | ! style="width: 120px" | Classes | + | ! style="width:120px" | Refittable Types |
− | ! [[File:Icon_Dev.png|20px|Craftable]] | + | ! [[File:Icon_Dev.png|20px|Craftable|link=Development]] |
− | ! [[File:Icon_Imp.png|20px|Improvable]] | + | ! [[File:Icon_Imp.png|20px|Improvable|link=Improvement]] |
− | ! style="white-space:nowrap;" | Notes]=], | + | ! style="white-space:nowrap" | Notes]=], |
| _column_cell_templates = { | | _column_cell_templates = { |
− | id = [[| style="${text_align}; background-color: ${bg_color};padding: 3px;" |${values.value}]], | + | id = [[| style="${text_align};background-color:${bg_color}" |${values.value}]], |
− | rarity = [[| style="${text_align}; background-color: ${bg_color}; padding: 3px;" |${values.value}]], | + | rarity = [[| rowspan="${rowspan}"style="${text_align};background-color:${bg_color}" |${values.value}]], |
− | name = [[| style="${text_align}; background-color: ${bg_color};padding: 5px;" |${values.name}<br />${values.icon} ${values.japanese_name}]], | + | name = [[| style="${text_align};background-color:${bg_color}" |${values.name}<br />${values.icon} ${values.japanese_name}]], |
− | equipment_type = [[| style="${text_align}; background-color: ${bg_color}; padding: 3px;" |${values.value}]], | + | equipment_type = [[| rowspan="${rowspan}" style="${text_align};background-color:${bg_color}" |${values.value}]], |
− | stats = [[| style="${text_align}; background-color: ${bg_color}; padding: 3px;" |${values.value}]], | + | stats = [[| style="${text_align};background-color:${bg_color}" |${values.value}]], |
− | compatibility = [[| style="${text_align}; background-color: ${bg_color}; padding: 3px;" |${values.value}]], | + | compatibility = [[| rowspan="${rowspan}"style="${text_align};background-color:${bg_color}" |${values.value}]], |
− | buildable = [[| style="${text_align}; background-color: ${bg_color}; padding: 3px;" |${values.value}]], | + | buildable = [[| rowspan="${rowspan}"style="${text_align};background-color:${bg_color}" |${values.value}]], |
− | improvable = [[| style="${text_align}; background-color: ${bg_color}; padding: 3px;" |${values.value}]], | + | improvable = [[| rowspan="${rowspan}" style="${text_align};background-color:${bg_color}" |${values.value}]], |
− | notes = [[| style="${text_align}; background-color: ${bg_color}; padding: 3px;" |${values.value}]] | + | notes = [[| class="${classes}" rowspan="${rowspan}" style="${text_align};background-color:${bg_color}" |${values.value}]] |
| }, | | }, |
| _columns = { | | _columns = { |
Line 65: |
Line 65: |
| | | |
| function EquipmentListKai:equipment_type(equipment) | | function EquipmentListKai:equipment_type(equipment) |
− | return {values = {value = Formatting:format_equipment_types(equipment)}, bg_color = self._transparent, text_align = ""} | + | return {values = {value = Formatting:format_equipment_type(equipment:type())}, bg_color = self._transparent, text_align = ""} |
| end | | end |
| | | |
Line 93: |
Line 93: |
| | | |
| function EquipmentListKai:compatibility(equipment) | | function EquipmentListKai:compatibility(equipment) |
− | return {values = {value = Formatting:format_ship_compatibility(equipment:equippable())}, bg_color = self._transparent, text_align = "text-align: " .. self._start_align} | + | local value = Formatting:format_ship_compatibility(equipment:equippable()) |
| + | if equipment:is_lbas_plane() then |
| + | value = value == "" and "LBAS" or value .. "; LBAS" |
| + | end |
| + | return {values = {value = value}, bg_color = self._transparent, text_align = "text-align: " .. self._start_align} |
| end | | end |
| | | |
Line 107: |
Line 111: |
| local note = self._notes[equipment] | | local note = self._notes[equipment] |
| if note then | | if note then |
− | return {values = {value = note.note or ""}, bg_color = self._transparent} | + | return {values = {value = note.note or ""}, bg_color = self._transparent, text_align = "text-align: " .. self._start_align} |
| end | | end |
− | return {values = {value = ""}, bg_color = self._transparent} | + | return {values = {value = ""}, bg_color = self._transparent, text_align = "text-align: " .. self._start_align} |
| end | | end |
| | | |