FANDOM


--So much credit in these Modules goes to the roblox.wikia.com, especially from Mark Otaris.
local yesno = require('Dev:Yesno')
local roblox_urls = require('Module:RobloxUrls')
local links = require('Module:Links')
local currency = require('Module:Currency')
local utils = require("Module:Utils")
local infobox_utils = require('Module:InfoboxUtils')
local enumerate_genres = require('Module:Genre')._enumerate_genres
 
local categorize = utils.categorize('Catalog', 'Community')
 
 local p = {}
 function p._format_title(args)
	if args.id == '{{{id}}}' then
		return utils.error_message("<code>id</code> parameter missing and is required.")
	elseif tonumber(args.id) then
		if args.id == "0" then
			return categorize("Items which are not in the catalog")
		else
			return links.plain_external_link(roblox_urls.item_from_id(args.id), args.name)
		end
	else
		return utils.error_message("<code>id</code> must be a number")
	end
end
 
p.format_title = utils.make_wrapper_function(p._format_title)
 
function p._format_13Plus(args)
    if yesno(args["13Plus"]) then
        return "13+"
    end
end
 
p.format_13Plus = utils.make_wrapper_function(p._format_13Plus)
 
function p._format_membership(args)
    local membership = args.Membership
    if membership then
        if membership == "BC" then
        return "BC only item"
    elseif membership == "TBC" then
        return "TBC only item"
    elseif membership == "OBC" then
        return "OBC only item"
    elseif membership == "bc" or membership == "tbc" or membership == "obc" then
        return utils.error_message("Please capitalize the membership type.")
        end
    end
end
 
p.format_membership = utils.make_wrapper_function(p._format_membership)
 
 return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.