Module:NWNapps

local NWNapps = {} --- imported libraries -- Parses invocation and template parameters, trims whitespace, and removes blanks. local getArgs = require('Dev:Arguments').getArgs --- local data with allowed abbreviations. local nwnData = mw.loadData( 'Module:NWNapps/data' ) -- This is the default output if no arguments are specified. local output = "Neverwinter Nights series"

-- function NWNapps.NeverwinterNightsAppearances (frame) -- interprets parameters local args = getArgs(frame) -- calls the internal function that does most of the work -- sends the result back to the template / article return NWNapps._NeverwinterNightsAppearances(args) end

function NWNapps._NeverwinterNightsAppearances(args) if args[1] then output = output..' ('		for _,v in ipairs(args) do			output = output..nwnData[v]..' • '		end		-- Remove the trailing ' • ' and close the span.		output = mw.ustring.sub(output, 1, -4)..') ' end return output end

return NWNapps