Module:CustomizationGallery

local p = {} local cargo = mw.ext.cargo local getArgs = require('Module:Arguments').getArgs local sentenceCase = require('Module:SentenceCase').firstToUpper

function p.main(frame) local args        = getArgs(frame) local where       = args['where'] or '' local game        = args['game'] or '' local limit       = args['limit'] or '' if game == "New Leaf" then return p.outputNLGallery(where) elseif game == "New Horizons" then return p.outputNHGallery(where) end end

function p.outputNLGallery(where, limit) local function isEmpty(s) return s == nil or s == '' end local print = '' local tables = 'nl_furniture,nl_furniture_variation' local fields = "nl_furniture.en_name=name,nl_furniture_variation.variation=variation,nl_furniture_variation.pattern=pattern,nl_furniture_variation.ore=ore,nl_furniture_variation.image=image" local args = { join = 'nl_furniture_variation.en_name = nl_furniture.en_name', where = where, orderBy = 'nl_furniture.catalog_num, nl_furniture.en_name, nl_furniture_variation.variation_number,nl_furniture_variation.ore_number,nl_furniture_variation.pattern_number', limit = limit, default = '' }   local results = cargo.query( tables, fields, args ) print = print .. ''   return print end

return p