Module:BundleInfobox

local infobox_utils = require('Module:InfoboxUtils') local item_infobox = require('Module:ItemInfobox') local links = require('Dev:Links') local roblox_urls = require('Module:RobloxUrls') local utils = require("Module:Utils") local yesno = require('Dev:Yesno')

local p = {}

function p._format_title(args) if args.id and args.id ~= '' then return infobox_utils.error_message("Bundles should not have an id parameter. Use  or  .") end if (args['bundle id'] ==  or args['bundle id'] == nil) and (args['catalog id'] ==  or args['catalog id'] == nil) then return infobox_utils.error_message(" and   parameter missing") elseif tonumber(args['bundle id']) then if tonumber(args['bundle id']) <= 0 then return infobox_utils.error_message(" cannot be 0 or less") else return links.link(tostring(roblox_urls.bundle_from_id(args['bundle id'])), args.name, "ext") end elseif tonumber(args['catalog id']) then if tonumber(args['catalog id']) <= 0 then return infobox_utils.error_message(" cannot be 0 or less") else return links.link(tostring(roblox_urls.item_from_id(args['catalog id'])), args.name, "ext") end else return infobox_utils.error_message(" / must be a number") end end

p.format_title = utils.make_wrapper_function(p._format_title, true)

return p