5,478
edits
No edit summary |
No edit summary |
||
Line 31: | Line 31: | ||
function p.profile(frame) | function p.profile(frame) | ||
local | local charName = frame.args[1] | ||
if not | if not charName then return end | ||
local query = { | local query = { | ||
limit = '1', | limit = '1', | ||
where = 'name_en="' .. | where = 'name_en="' .. charName .. '"', | ||
} | } | ||
local fields = {'strengths','weaknesses','ears','tail','family', | local fields = {'strengths','weaknesses','ears','tail','family', | ||
Line 44: | Line 44: | ||
local ch = characters[1] | local ch = characters[1] | ||
if ch then | if not ch then return end | ||
local template = frame:expandTemplate{ | |||
title='Character Profile/table', | |||
args={ | |||
strengths=ch.strengths, | |||
weaknesses=ch.weaknesses, | |||
ears=ch.ears, | |||
tail=ch.tail, | |||
family=ch.family, | |||
my_rule=ch.my_rule, | |||
phone_background=ch.phone_background, | |||
before_a_race=ch.before_a_race, | |||
good_subject=ch.good_subject, | |||
secret_pride=ch.secret_pride, | |||
frequent_purchase=ch.frequent_purchase, | |||
secret1=ch.secret1, | |||
secret2=ch.secret2, | |||
} | } | ||
} | |||
return template | |||
return | |||
end | end | ||
return p | return p |