Line 53: |
Line 53: |
| end | | end |
| | | |
− | function EventComp:process_equipment(equip) | + | function EventComp:process_equipment(ship, equip, slot) |
| --Fighter power | | --Fighter power |
| --Only fighter planes, dive bombers, torpedo bombers and seaplane bombers with an AA stat are counted | | --Only fighter planes, dive bombers, torpedo bombers and seaplane bombers with an AA stat are counted |
Line 87: |
Line 87: |
| } | | } |
| elseif entry.ship and entry.level then | | elseif entry.ship and entry.level then |
− | table.insert(entry.equips, self._equip_class(item_key)) | + | local equip = self._equip_class(item_key) |
| + | table.insert(entry.equips, equip) |
| + | self:process_equipment(equip, select(2, ship:slot(#entry.equips))) |
| elseif entry.ship then | | elseif entry.ship then |
| entry.level = tonumber(item_key) | | entry.level = tonumber(item_key) |
Line 117: |
Line 119: |
| if column == "equipment" then | | if column == "equipment" then |
| for index, equip in ipairs(row_values[column]) do | | for index, equip in ipairs(row_values[column]) do |
− | self:process_equipment(equip)
| |
| local values = { equip_name = Formatting:format_link(equip:link()), style = "" } | | local values = { equip_name = Formatting:format_link(equip:link()), style = "" } |
| if index == #row_values[column] then values.style = "border-bottom: 1px solid grey;" end | | if index == #row_values[column] then values.style = "border-bottom: 1px solid grey;" end |