Module:MonsterVariantsTable: Difference between revisions
m
no edit summary
Californ1a (talk | contribs) mNo edit summary |
Californ1a (talk | contribs) mNo edit summary |
||
Line 1:
local editbutton = require('Module:Edit button')
local p = {}
Line 6 ⟶ 7:
function p.formatProfessionLevel(profession, level, high)
end▼
profession = profession or 'Unknown profession'
local level_text = tostring(level or '?')
Line 17 ⟶ 15:
end
function p._main(args, Avariant)
local variant = args[1] or args.variant or Avariant or ''
local query = {
string.format('[[Variant of::%s]] [[Has query::+]] OR [[Has subobject::<q>[[Variant of::%s]]</q>]]', variant, variant),
'?Image#64px;x64px=img',
'?Has subobject.Image#64px;x64px=img2',
'?Name=name',
'?= page',
'?Unlock_level = unlock',
Line 72 ⟶ 71:
return tbl
function p.get_entry(entry, param)
return entry[param]
or (type(entry[param..'2']) == 'table' and entry[param..'2'][1])
or (type(entry[param..'2']) == 'string' and entry[param..'2'])
end
Line 93 ⟶ 98:
for _,entry in ipairs(results) do
local edit = editbutton("'''?''' (edit)", entry.name)
local built_entry = {
combat =
img =
unlock =
profession =
page = entry.page
}
|