Changes

no edit summary
Line 64: Line 64:     
function EquipmentInfoKai:name(equipment)
 
function EquipmentInfoKai:name(equipment)
 +
local localized_name = equipment:localized_name()
 +
if localized_name then
 +
local name, page, section = equipment:link()
 +
return Formatting:format_link(Formatting:format_stat_with_max(name, localized_name), page, section)
 +
end
 
return Formatting:format_link(equipment:link())
 
return Formatting:format_link(equipment:link())
 
end
 
end
Line 72: Line 77:     
function EquipmentInfoKai:japanese_name(equipment)
 
function EquipmentInfoKai:japanese_name(equipment)
return Formatting:format_stat(equipment:japanese_name())
+
return Formatting:tooltip(Formatting:format_stat(equipment:japanese_name()), Formatting:format_stat(equipment:reading()))
 
end
 
end
   Line 107: Line 112:     
function EquipmentInfoKai:card(equipment)
 
function EquipmentInfoKai:card(equipment)
 +
if equipment:has_card_name() then
 +
local card_caption = {}
 +
local card_local = equipment:card_localized_name()
 +
if card_local ~= false then
 +
table.insert(card_caption, Formatting:format_stat_with_max(equipment:card_name(), card_local))
 +
else
 +
table.insert(card_caption, equipment:card_name())
 +
end
 +
table.insert(card_caption, "/")
 +
table.insert(card_caption, Formatting:format_stat_with_max(equipment:card_japanese_name(), equipment:card_reading()))
 +
 +
return Formatting:format_image{equipment:card(),
 +
caption = table.concat(card_caption)
 +
}
 +
end
 
return Formatting:format_image{equipment:card()}
 
return Formatting:format_image{equipment:card()}
 
end
 
end
Anonymous user