Module:EnemyData

-- -- Lua Templating for all Equipment related info. local p = {} local questMap = mw.loadData( 'Module:EnemyData/QuestMapping' )

--[[ Gets the quest name for a given `ParamGroupName`  Usage:

Test in the Debug console using: frame = mw.getCurrentFrame frame.args['Name'] = 'RAID_01_01_E_02' print(p.QuestMapping(frame)) --]] function p.QuestMapping( frame ) local paramGroupName = frame.args['Name'] local default = frame.args['default'] or '' local result = questMap['map'][paramGroupName] if result == nil then for pattern, quest in pairs(questMap['patterns']) do   		if string.match(paramGroupName, pattern) then return quest end end end return result or default end

return p --