Module:Sound table

local p = {} local emptyevent = [=[None ]=] local nosubtitle = [=[None ]=]

local function vardefine( f, name, value ) f:callParserFunction( '#vardefine', name, value ) end

local function var( f, name, defaultvalue ) local result = f:callParserFunction( '#var', name, defaultvalue ) if result == '' then return nil end return result end

local function addCategory( nocat, value, categoryName ) if not nocat then local category = [=[]=] value = value .. category end return value end

function p.table( f ) local args = f	if f == mw.getCurrentFrame then args = require( 'Module:ProcessArgs' ).norm else f = mw.getCurrentFrame end local parent = f:getParent or f	local result = '' if not var( parent, 'soundstable' ) then vardefine( parent, 'soundstable', 1 ) if args.nocat then vardefine( parent, 'nocat', 1 ) end local bedrockordungeons = false if args.bedrock or args.dungeons then bedrockordungeons = true vardefine( parent, 'bedrockordungeons', 1 ) end if args.bedrock then vardefine( parent, 'bedrock', 1 ) end if args.dungeons then vardefine( parent, 'dungeons', 1 ) end result = result .. [=[ ]=] .. parent:expandTemplate{ title = 'notelist', args = { 'sound' } } end return tostring( result ) end return p