[checked revision] | [checked revision] |
([ST] + filePattern) |
([ST] jk im not allowing display everywhere, ill only allow it in ChampionClass) |
||
Line 7: | Line 7: | ||
p.filePattern = '%sSquare.png' |
p.filePattern = '%sSquare.png' |
||
p.imagesizes = { default = 25, display = 25, inline = 20, } |
p.imagesizes = { default = 25, display = 25, inline = 20, } |
||
+ | |||
+ | function p:name(opts) |
||
+ | if not opts then opts = {} end |
||
+ | return opts.display or self:get(opts.len or self.defaultlength) |
||
+ | end |
||
return p |
return p |
Revision as of 23:01, 3 August 2020
Edit the documentation or categories for this module.
If you are an editor wanting to update the list of champions, see {{Championnames}}m
local p = require('Module:EntityAbstract'):extends()
p.objectType = 'Champion'
p.cssClass = 'champion-object'
p.defaultlength = 'display'
p.imagelength = 'link'
p.filePattern = '%sSquare.png'
p.imagesizes = { default = 25, display = 25, inline = 20, }
function p:name(opts)
if not opts then opts = {} end
return opts.display or self:get(opts.len or self.defaultlength)
end
return p