Module:Unit

local getArgs = require('Module:Arguments').getArgs

local p = {}

function p.profile(frame) local args = getArgs(frame) local iname = args[1] local data = mw.loadData('Module:Data/Unit/Profile') return data[iname] end

function p.flavor(frame) local args = getArgs(frame) local iname = args[1] local key = args[2] local data = mw.loadData('Module:Data/Unit/Flavor') return (data[iname] or {})[key] end

function p.extra(frame) local args = getArgs(frame) local iname = args[1] local key = args[2] local data = mw.loadData('Module:Data/Extra/Unit') return (data[iname] or {})[key] end

return p