Module:Currency

local p = {}

function p.outputCurrency (frame) local num = frame.args['2'] local function isEmpty(s) return s == nil or s == '' end local data = { ["Bells"] = { "99k Bells NH Inv Icon cropped.png", "15px", "Bell", "Bell", "Bell" }, ["Play Coins"] = { "Play Coins Icon.png", "15px", "Play Coins", "Play Coin", "Play Coin" }, ["Medals"] = { "Medal NL Icon.png", "18px", "Medals", "Medal", "Medal" }, ["MEOW Coupons"] = { "MEOW Coupon Icon.png", "18px", "MEOW Coupons", "MEOW Coupon", "Coupon" }, ["Leaf Tickets"] = { "Leaf Ticket PC Icon.png", "15px", "Leaf Ticket", "Leaf Ticket", "Ticket" }, ["Nook Miles"] = { "Nook Miles NH Icon Cropped.png", "18px", "Nook Miles", "Nook Mile", "Mile" }, ["Heart Crystals"] = { "Heart Crystal NH Inv Icon.png", "15px", "Item:Heart Crystal (New Horizons)", "Heart Crystal", "Heart Crystal" }, ["Saharah Tickets"] = { "Saharah Ticket NH Inv Icon.png", "15px", "Item:Saharah Ticket (New Horizons)", "Saharah Ticket", "Saharah Ticket" }, ["Nook Points"] = { "Nook Points NH Icon Cropped.png", "18px", "NookLink#Nook Points", "Nook Point", "Point" }, ["Points"] = { "", "", "Tom Nook Point System", "Point", "Point" }, ["Happy Points"] = { "Happy Point aF Icon.png", "15px", "Happy Point", "Happy Point", "Happy Point" }, ["Happy Tickets"] = { "", "", "Happy Ticket", "Happy Ticket", "Happy Ticket" }, ["Poki"] = { "Poki NH Inv Icon cropped.png", "15px", "Poki", "Poki", "Poki" } }	local print = '' if not isEmpty(data[frame.args['1']][1]) then print = print .. ''		if not isEmpty(num) then print = print .. ' ' .. frame:preprocess('') end end print = print .. ' '	if not isEmpty(frame.args['nolink']) then if not isEmpty(frame.args['short']) then print = print .. data[frame.args['1']][5] if (num == 1) then print = print .. ''			else print = print .. 's'			end else print = print .. data[frame.args['1']][4] if (num == 1) then print = print .. ''			else print = print .. 's'			end end else if not isEmpty(frame.args['short']) then print = print .. '' .. data[frame.args['1'[3] .. '|' .. data[frame.args['1']][5] if (num == 1) then print = print .. ''			else print = print .. 's' print = print .. ']]'			end else print = print .. '' .. data[frame.args['1'[3] .. '|' .. data[frame.args['1']][4] if (num == 1) then print = print .. ''			else print = print .. 's' print = print .. ']]'			end end end if not isEmpty(frame.args['note']) then print = print .. frame:preprocess('') end return print end

return p