FANDOM


-- Like Module:Coins, but only for the image
-- {{Helper module|name=Coins image|fname1=(num)|ftype1=string,number|fuse1=Creates the correct coins image for the number}}
return function(q)
	q = mw.text.split(tostring(q or ''),'[,%-–]')
	local max_q = 1
	for _, v in ipairs(q) do
		if (tonumber(v) or 0) > max_q then
			max_q = tonumber(v)
		end
	end
	-- From [[Module:Coins]] (mostly)
	for _, j in ipairs( { 10000, 1000, 250, 100, 25, 5, 4, 3, 2 } ) do
		if max_q >= j then
			max_q = j
			break
		end
	end
	return 'Coins '..max_q..'.png'
end

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.