• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Difference between revisions of "Module:ArtistData"

From Kancolle Wiki
Jump to navigation Jump to search
com>Ckwng
m (Ckwng moved page Module:Artist to Module:ArtistData without leaving a redirect)
m (3 revisions imported)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
local BaseData = require("Module:BaseData")
+
local PersonData = require("Module:PersonData")
  
local ArtistData = BaseData()
+
local ArtistData = PersonData()
 
 
--The name of the artist.
 
function ArtistData:name()
 
return self._name
 
end
 
 
 
--A group of values passable to Formatting:format_external_link() to create a wikitext link to this artist (usually on pixiv).
 
function ArtistData:link()
 
if self._page then
 
return self._page, self:name()
 
else
 
return self:name()
 
end
 
end
 
 
 
--The name of the artist in Japanese.
 
function ArtistData:japanese_name()
 
return self._japanese_name
 
end
 
 
 
--The reading of the artist's Japanese name.
 
function ArtistData:reading()
 
return self._reading
 
end
 
 
 
function ArtistData:create(artist)
 
artist = artist or {}
 
setmetatable(artist, artist)
 
artist.__index = self
 
artist.__call = self.__call
 
return artist
 
end
 
  
 
return ArtistData
 
return ArtistData

Latest revision as of 12:43, 12 May 2021

Documentation for this module may be created at Module:ArtistData/doc

local PersonData = require("Module:PersonData")

local ArtistData = PersonData()

return ArtistData