Changes

no edit summary
Line 14: Line 14:  
_stat_1 = "%d",
 
_stat_1 = "%d",
 
_stat_2 = "%d (%d)",
 
_stat_2 = "%d (%d)",
 +
_kekkon_max_template = "Maximum after marriage: ${value}",
 
_slot_template = [[|- align=center style="background-color: whitesmoke; line-height: 1.1;"
 
_slot_template = [[|- align=center style="background-color: whitesmoke; line-height: 1.1;"
 
| style="width: 36px; height: 36px; background-color: ${color};${extra_style}" | ${icon}
 
| style="width: 36px; height: 36px; background-color: ${color};${extra_style}" | ${icon}
Line 104: Line 105:     
function ShipInfoKai:hp(ship)
 
function ShipInfoKai:hp(ship)
return Formatting:format_stat(ship:hp())
+
local hp = Formatting:format_stat(ship:hp())
 +
local hp_max = ship:hp_max()
 +
if hp_max then
 +
return Formatting:tooltip(hp, format{self._kekkon_max_template, value = Formatting:format_stat(hp_max)})
 +
end
 +
return hp
 
end
 
end
   Line 125: Line 131:  
function ShipInfoKai:aa(ship)
 
function ShipInfoKai:aa(ship)
 
return Formatting:format_stat_with_max(ship:aa(), ship:aa_max())
 
return Formatting:format_stat_with_max(ship:aa(), ship:aa_max())
 +
end
 +
 +
function ShipInfoKai:aircraft(ship)
 +
return Formatting:format_stat(ship:total_space())
 
end
 
end
   Line 230: Line 240:  
vars.evasion = self:evasion(ship)
 
vars.evasion = self:evasion(ship)
 
vars.aa = self:aa(ship)
 
vars.aa = self:aa(ship)
vars.aircraft = ship:total_space()
+
vars.aircraft = self:aircraft(ship)
 
vars.asw = self:asw(ship)
 
vars.asw = self:asw(ship)
 
vars.speed = self:speed(ship)
 
vars.speed = self:speed(ship)
Anonymous user