Module:EffectType: Difference between revisions

131 bytes added ,  02:03, 12 March 2021
m
no edit summary
(Created page with "local p = {} effectTypes = {"General", "Mental", "Metabolic", "Respiratory", "Circulatory", "Contact", "Field", "Activity", "Dimensional", "Chemical", "Structural", "Sonic",...")
 
mNo edit summary
Line 8: Line 8:
function p.getTypes(frame)
function p.getTypes(frame)
frame = mw.getCurrentFrame()
frame = mw.getCurrentFrame()
typeList = p.parse(frame.args[1])
if frame.args[1] == nil or frame.args[1] == "" then
error("An argument must be provided!")
end
typeList = p.parse(mw.text.trim(frame:preprocess(frame.args[1])))
return table.concat(typeList, ', ')
return table.concat(typeList, ', ')
end
end