Module:Event

local member = require('Module:Member') local utils = require('Module:Utils') local link_type = require('Module:Type').link local member_tag_descriptions = require('Module:Member tags').member_tag_descriptions local p = {} function p._create(args) local parameter_list = '' for argn, value in ipairs(utils.trim_positional_arguments(args)) do       -- If the value contains whitespace, we assume it describes a parameter with the parameter type and name separated by whitespace. if mw.ustring.find(value, '%s') then -- If the parameter list already contains parameters, add a space and a comma before inserting another. if parameter_list ~= '' then parameter_list = parameter_list .. ", "           end -- Get the parameter type and name from the value. local parameter_type, parameter_name = mw.ustring.match(value, '(.+)%s+(.+)') parameter_type, parameter_name = mw.ustring.match(value, '(.+)%s+(.+)') parameter_list = parameter_list .. link_type(parameter_type) .. " " .. mw.text.tag('var', {class="parameter-name"}, parameter_name) end end -- Filter out parameter types and names from tags. local tags = {} for tag in next, utils.array_to_set(utils.trim_positional_arguments(args)) do       if member_tag_descriptions[tag] then tags[tag] = true end end local icon = 'Pubevent.gif' if tags['RobloxPlaceSecurity'] then icon = 'Privevent.gif' else for tag in pairs(tags) do           if tag:match('[Ss]ecurity') then icon = 'Protevent.gif' end end end return member._create { name = args.name; tags = tags; icon = icon; ["parameter list"] = parameter_list; } end p.create = utils.make_wrapper_function(p._create) return p