Changes

no edit summary
Line 66: Line 66:     
     _row = [=[|-
 
     _row = [=[|-
| style="text-align:left;" rowspan="4" id="${link}" | [[${link}]]
+
| style="text-align:left;" rowspan="4" id="${link}" | ${link}
 
| 0
 
| 0
 
| nowrap | ${devmats0}/${devmats0_x}
 
| nowrap | ${devmats0}/${devmats0_x}
Line 95: Line 95:     
}
 
}
 +
 +
function format_ship_link(ship)
 +
    return format{
 +
        [=[<span class="advanced-tooltip">[[${ship_name}]]<div class="tooltip-contents">[[File:${ship_name} Battle.jpg]]</div></span>]=],
 +
        ship_name = ship:name()
 +
    }
 +
end
    
function format_ships_and_days(ship_keys, equipment, product)
 
function format_ships_and_days(ship_keys, equipment, product)
Line 114: Line 121:  
                 if not base_forms[ship:base_name()] then
 
                 if not base_forms[ship:base_name()] then
 
                     base_forms[ship:base_name()] = true
 
                     base_forms[ship:base_name()] = true
                     table.insert(result_ships, "[[" .. ship:name() .. "]]")
+
                     table.insert(result_ships, format_ship_link(ship))
 
                     for day, day_availability in pairs(availability) do
 
                     for day, day_availability in pairs(availability) do
 
                         table.insert(days[day], day_availability and string.sub(ship_key, 1, 1))
 
                         table.insert(days[day], day_availability and string.sub(ship_key, 1, 1))
Line 160: Line 167:  
         text = text,
 
         text = text,
 
         equipment_name = equipment_name,
 
         equipment_name = equipment_name,
         equipment_card = equipment_card,
+
         equipment_card = equipment_card
 +
    }
 +
end
 +
 
 +
function format_equipment_link(equipment)
 +
    return format{
 +
        [=[<span class="advanced-tooltip">[[${equipment_link}]]<div class="tooltip-contents">[[File:${equipment_card}|150px]]</div></span>]=],
 +
        text = text,
 +
        equipment_link = equipment:link(),
 +
        equipment_card = equipment:card()
 
     }
 
     }
 
end
 
end
Line 225: Line 241:  
         table.insert(self.rows, format{
 
         table.insert(self.rows, format{
 
             self._row,
 
             self._row,
             link = equipment:link(),
+
             link = format_equipment_link(equipment),
 
             fuel = resources.fuel or 0,
 
             fuel = resources.fuel or 0,
 
             ammo = resources.ammo or 0,
 
             ammo = resources.ammo or 0,
cssedit, gkautomate
7,064

edits