Module:Misc

-- Simple text parsing that do not fit in other modules

local getArgs = require('Module:Arguments').getArgs local mergeArgsSyntax = require('Module:Arguments').mergeArgsSyntax local loader = require('Module:Loader')

local string, table, yesno = loader.require('String', 'Table', 'Yesno')

local p = {}

function p.sprayTooltip(frame) local args = getArgs(frame) local lore = args.lore or '' local inklist = mergeArgsSyntax({ args.inklist } or '') local inkstring = '' inklist = table.map(inklist, function (v)		local num, item = v:match('%s*(%d+)x?%s+(.*)%s*')		if num and item then			return ('&7 %s: &a%s%%'):format(item, num)		end	end) return ('%s//&7Required Ink/%s//&eRight-Click to preview!//&eClick to select!'):format(lore, table.concat(inklist, '/')) end

return p