Changes

no edit summary
Line 85: Line 85:     
function ShipMetaKai:voice_actor()
 
function ShipMetaKai:voice_actor()
local voice_actor = VoiceActor(self._ship:voice_actor())
+
self._vars.voice_actor = self:person(VoiceActor(self._ship:voice_actor()))
self._vars.voice_actor = format{self._person_template, name = Formatting:format_external_link(voice_actor:link()), japanese_name = tostring(Formatting:japanese_text(Formatting:format_stat(voice_actor:japanese_name()), Formatting:format_stat(voice_actor:reading())))}
   
end
 
end
    
function ShipMetaKai:artist()
 
function ShipMetaKai:artist()
local artist = Artist(self._ship:artist())
+
self._vars.artist = self:person(Artist(self._ship:artist()))
self._vars.artist = format{self._person_template, name = Formatting:format_external_link(artist:link()), japanese_name = tostring(Formatting:japanese_text(Formatting:format_stat(artist:japanese_name()), Formatting:format_stat(artist:reading())))}
+
end
 +
 
 +
function ShipMetaKai:person(person)
 +
local link, japanese_name, reading = Formatting:format_external_link(person:link()), person:japanese_name(), person:reading()
 +
if japanese_name == false then
 +
return link
 +
elseif reading == false then
 +
    japanese_name = tostring(Formatting:japanese_text(Formatting:format_stat(person:japanese_name())))
 +
else
 +
    japanese_name = tostring(Formatting:japanese_text(Formatting:format_stat(person:japanese_name()), Formatting:format_stat(person:reading())))
 +
end
 +
return format{self._person_template, name = Formatting:format_external_link(person:link()), japanese_name = japanese_name}
 
end
 
end
  
Anonymous user