Line 15: |
Line 15: |
| _table_end = [[|}]], | | _table_end = [[|}]], |
| _row_starter = "|-", | | _row_starter = "|-", |
− |
| |
− | _transparent = "transparent",
| |
− | _ship_image_bg = "#7FB8D6",
| |
− | _equip_icon_bg = "#8DCDEE",
| |
− | _equip_link_bg = "#E4F3FB",
| |
− | _equip_locked_bg = "#CDDBE2",
| |
− | _equip_icon_size = "22x22px",
| |
− | _center_align = "center",
| |
| | | |
| _header_top_template = [[<div class="mw-customtoggle-${toggle_class}" style="width: 615px; background: #A596B5; border-top-right-radius: 60px; border-top-left-radius: 60px; text-align: center; font-size: 18px; color: #000040;">''Main Fleet''</div>]], | | _header_top_template = [[<div class="mw-customtoggle-${toggle_class}" style="width: 615px; background: #A596B5; border-top-right-radius: 60px; border-top-left-radius: 60px; text-align: center; font-size: 18px; color: #000040;">''Main Fleet''</div>]], |
Line 36: |
Line 28: |
| | style="width: 438px; background-color: #F1E7E0; border: 2px solid #D0B118; border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; border-top-right-radius: 10px; vertical-align: center; text-align: center;" | ${value} | | | style="width: 438px; background-color: #F1E7E0; border: 2px solid #D0B118; border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; border-top-right-radius: 10px; vertical-align: center; text-align: center;" | ${value} |
| |}]], | | |}]], |
| + | |
| + | _blank_battle_card = "Empty card.png", |
| | | |
| _id = "", | | _id = "", |
Line 85: |
Line 79: |
| | | |
| function CombinedFleet:process_equipment(ship, entry, slot) | | function CombinedFleet:process_equipment(ship, entry, slot) |
− | if not ship._equipment then return "", "" end --No idea why this fixes ship:slots() being nil | + | if not ship._equipment then return "", "- Locked -" end --No idea why this fixes ship:slots() being nil |
| local slots = ship and ship:slots() or 0 | | local slots = ship and ship:slots() or 0 |
| local equip_icon, equip_link | | local equip_icon, equip_link |
Line 139: |
Line 133: |
| for a = 1, 3 do | | for a = 1, 3 do |
| local ship = ships["ship" .. a] | | local ship = ships["ship" .. a] |
− | local ship_card = Formatting:format_image{ship:battle_card(), link = ship:link(), caption = ship:name(), align = "center"} | + | local ship_card = Formatting:format_image{ship:battle_card() or self._blank_battle_card, link = ship:link(), caption = ship:name(), align = "center"} |
| table.insert(self._rows, format{self._ship_image_template, | | table.insert(self._rows, format{self._ship_image_template, |
| position_image = Formatting:format_image{"Ship position " .. tostring(i + a - 1) .. " icon.png"}, | | position_image = Formatting:format_image{"Ship position " .. tostring(i + a - 1) .. " icon.png"}, |