FANDOM


-- Written by TJcool007
 
local p = {}
 
local function _getLevel( pageName, version )
	if not pageName or pageName == '' then return false end
 
	-- Setup
	local level = pageName:match('^Level (%d+)')
 
	-- Get difficulty for the page
	local data = mw.loadData( 'Module:Difficulty level/List')
	local myDifficulty = data[tonumber(level)]
	if not myDifficulty then return false end
 
	-- Parse difficulty
	if type( myDifficulty ) == 'string' then
		return myDifficulty
	end
end
 
function p.getLevel( frame )
	local a = frame:getParent().args
	return _getLevel( a[1] or mw.title.getCurrentTitle().text, a[2] ) or a.default or 'Undetermined: start a discussion relating to difficulty in the comments section below!'
end
 
return p

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.