Module:PlaceInfobox

local yesno = require('Dev:Yesno') local utils = require("Module:Utils") local gear = require("Module:Gear attribute") local infobox_utils = require('Module:InfoboxUtils') local utils = require('Module:Utils') local currency = require('Module:Currency') local item_infobox = require('Module:ItemInfobox') local categorize = utils.categorize(0, 'Community') local p = {} function p._format_gear_types(args) return gear.enumerate_gear_attributes {gear_attributes = args["gear types"], categorize = false} end p.format_gear_types = utils.make_wrapper_function(p._format_gear_types) function p._format_cost(args) local cost = utils.parse_number(args.cost or args.price) if cost then return cost ~= 0 and currency._format_robux {amount = cost} or error("Refrain from providing a price if the game is free to play.") end end p.format_cost = utils.make_wrapper_function(p._format_cost) function p._format_creator(args) local creator = args.creator or args.owner if yesno(args["group place"]) then return creator .. categorize("Group places") else return item_infobox._format_creator(args) end end p.format_creator = utils.make_wrapper_function(p._format_creator) function p._format_month_created(args) local month_created = args['month created'] if month_created then local month, year = args['month created']:match("^(%a+) (%d%d%d%d)$") if month and year then return year > "2005" and month .. ' ' .. year .. categorize(year .. " places") or error("ROBLOX game creation has only existed since 2006.") else return infobox_utils.error_message("invalid value for ; try something like \"October 2015\"") end else return error("The creation month must be specified") end end p.format_month_created = utils.make_wrapper_function(p._format_month_created) function p._format_place_visits(args) return infobox_utils.format_number(args["place visits"], 10000, "Places with less than 750000 visits", 750000, "SUSPECTED_NCU") end p.format_place_visits = utils.make_wrapper_function(p._format_place_visits) function p._format_uncopylocked(args) if yesno(args.uncopylocked) then return "Uncopylocked" .. categorize("Uncopylocked places") end end p.format_uncopylocked = utils.make_wrapper_function(p._format_uncopylocked) return p