Module:SkillUnlocks: Difference between revisions

no edit summary
m (Pksage moved page Module:Sandbox/SkillUnlocks to Module:SkillUnlocks without leaving a redirect)
No edit summary
(One intermediate revision by one other user not shown)
Line 17: Line 17:
local GameData = require('Module:GameData')
local GameData = require('Module:GameData')
local SkillData = GameData.skillData
local SkillData = GameData.skillData
local Num = require('Module:Number')


-- This excludes certain checks pertinent to all skills, like equipment
-- This excludes certain checks pertinent to all skills, like equipment
Line 1,238: Line 1,239:
processed['entityName'] = gatherable.name
processed['entityName'] = gatherable.name
elseif skillName == 'Mining' then
elseif skillName == 'Mining' then
processed['subType'] = node.type
processed['subType'] = node.category
elseif skillName == 'Farming' then
elseif skillName == 'Farming' then
processed['entityName'] = gatherable.name
processed['entityName'] = gatherable.name
Line 1,337: Line 1,338:
table.insert(extraReqs, Shop._getPurchaseIcon({req.purchase}))
table.insert(extraReqs, Shop._getPurchaseIcon({req.purchase}))
elseif req.type == 'totalMastery' then
elseif req.type == 'totalMastery' then
table.insert(extraReqs, Shared.formatnum(req.mastery) .. ' ' .. Icons.Icon({req.skill, type='skill', notext=true}) .. ' ' .. Icons.Icon({'Mastery'}))
table.insert(extraReqs, Num.formatnum(req.mastery) .. ' ' .. Icons.Icon({req.skill, type='skill', notext=true}) .. ' ' .. Icons.Icon({'Mastery'}))
elseif req.type == 'TownshipBuilding' then
elseif req.type == 'TownshipBuilding' then
local building = Township._getBuildingByID(req.buildingID)
local building = Township._getBuildingByID(req.buildingID)
Line 1,391: Line 1,392:
if entity.subType == 'fish' then
if entity.subType == 'fish' then
iconType = 'item'
iconType = 'item'
elseif entity.subType == 'Essence' or entity.subType == 'Ore' or entity.subType == 'Gem' then
elseif Shared.contains({
'melvorD:Ore',
'melvorD:Essence',
'melvorD:Gem',
'melvorItA:AbyssalOre',
'melvorItA:AbyssalGem',
'melvorItA:Outcrop',
'melvorItA:AbyssalEssence'
}, entity.subType) then
iconType = 'rock'
iconType = 'rock'
else
else
2,869

edits