To edit the documentation or categories for this module, click here.
If modifying this module, please contact River or another wiki admin to ensure your change is synchronized across wikis.
|
local util_vars = require("Module:VarsUtil")
local p = require('Module:EntityAbstract'):finalExtends()
local h = {}
p.objectType = 'Region'
p.imagelength = 'link'
p.defaultlength = 'medium'
p.cssClass = 'region-object'
function p:image(opts)
if self.is_nil then return nil end
if not opts then opts = {} end
local div = mw.html.create('div')
:addClass('region-icon')
:addClass(opts.class)
-- sorry for this
:cssText(('color:%s; font-size:%spx;'):format(self:get('hex'),
opts.bracket and self:get("bracketsize") or self:get("size") or "12"))
:wikitext(self:get('short'))
return tostring(div)
end
return p