Changes

no edit summary
Line 70: Line 70:  
| nowrap | ${devmats0}/${devmats0_x}
 
| nowrap | ${devmats0}/${devmats0_x}
 
| nowrap | ${impmats0}/${impmats0_x}
 
| nowrap | ${impmats0}/${impmats0_x}
| nowrap | ${equips0}
+
| nowrap style="background:${equips0_bg};" | ${equips0}
 
| style="background-color:rgb(169, 197, 168);" rowspan="2" | ${fuel}
 
| style="background-color:rgb(169, 197, 168);" rowspan="2" | ${fuel}
 
| style="background-color:rgb(191, 191, 191);" rowspan="2" | ${steel}
 
| style="background-color:rgb(191, 191, 191);" rowspan="2" | ${steel}
Line 80: Line 80:  
| nowrap rowspan="2" | ${devmats6}/${devmats6_x}
 
| nowrap rowspan="2" | ${devmats6}/${devmats6_x}
 
| nowrap rowspan="2" | ${impmats6}/${impmats6_x}
 
| nowrap rowspan="2" | ${impmats6}/${impmats6_x}
| nowrap rowspan="2" | ${equips6}
+
| nowrap rowspan="2" style="background:${equips6_bg};" | ${equips6}
 
|-
 
|-
 
| style="background-color:rgb(194, 184, 168);" rowspan="2" | ${ammo}
 
| style="background-color:rgb(194, 184, 168);" rowspan="2" | ${ammo}
Line 88: Line 88:  
| nowrap | ${devmats10}/${devmats10_x}
 
| nowrap | ${devmats10}/${devmats10_x}
 
| nowrap | ${impmats10}/${impmats10_x}
 
| nowrap | ${impmats10}/${impmats10_x}
| nowrap | ${equips10}]=],
+
| nowrap style="background:${equips10_bg};" | ${equips10}]=],
    
     _day_cell = [[| style="background-color:${background}" rowspan="4" | ${ships}]],
 
     _day_cell = [[| style="background-color:${background}" rowspan="4" | ${ships}]],
Line 157: Line 157:  
function equipment_tooltip(text, equipment_name, equipment_card)
 
function equipment_tooltip(text, equipment_name, equipment_card)
 
     return format{
 
     return format{
         [=[<span class="advanced-tooltip explain" style="color:red;">[[${equipment_name}|${text}]]<div class="tooltip-contents">[[File:${equipment_card}|150px]]</div></span>]=],
+
         [=[<span class="advanced-tooltip">[[${equipment_name}|${text}]]<div class="tooltip-contents">${equipment_name}<br>[[File:${equipment_card}|150px]]</div></span>]=],
 
         text = text,
 
         text = text,
 
         equipment_name = equipment_name,
 
         equipment_name = equipment_name,
Line 171: Line 171:  
                 return tostring(amount)
 
                 return tostring(amount)
 
             elseif equipment then
 
             elseif equipment then
                 local equipment_card = Equipment(equipment):card()
+
                 return equipment_tooltip(amount, equipment, Equipment(equipment):card())
                return equipment_tooltip(amount, equipment, equipment_card)
   
             end
 
             end
 
         elseif resources.equipment == false then
 
         elseif resources.equipment == false then
Line 181: Line 180:  
     else
 
     else
 
         return "-"
 
         return "-"
 +
    end
 +
end
 +
 +
function format_equipment_bg(resources)
 +
    if resources and resources.equipment and type(first(resources.equipment)) == "string" then
 +
        return "#ffe0b2"
 +
    else
 +
        return "transparent"
 
     end
 
     end
 
end
 
end
Line 238: Line 245:  
             equips6 = format_equipment(resources6),
 
             equips6 = format_equipment(resources6),
 
             equips10 = format_equipment(resources10),
 
             equips10 = format_equipment(resources10),
 +
            equips0_bg = format_equipment_bg(resources0),
 +
            equips6_bg = format_equipment_bg(resources6),
 +
            equips10_bg = format_equipment_bg(resources10),
 
             upgrades = #product_names == 1 and "[[" .. product_names[1] .. "]]" or #product_names > 1 and "Unimplemented" or "None",
 
             upgrades = #product_names == 1 and "[[" .. product_names[1] .. "]]" or #product_names > 1 and "Unimplemented" or "None",
 
             ships = ships,
 
             ships = ships,
cssedit, gkautomate
7,064

edits