Module:SkillUnlocks: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 26: Line 26:
['Prayer'] = {'prayers'},
['Prayer'] = {'prayers'},
['Slayer'] = {'areas'},
['Slayer'] = {'areas'},
['Farming'] = {'gatheringitems', 'farmingplots'},
['Farming'] = {'mastery', 'gatheringitems', 'farmingplots'},
['Township'] = {'townshipunlocks'},
['Township'] = {'townshipunlocks'},
['Woodcutting'] = {'gatheringitems'},
['Woodcutting'] = {'mastery', 'gatheringitems'},
['Fishing'] = {'gatheringitems'},
['Fishing'] = {'mastery', 'gatheringitems'},
['Firemaking'] = {'firemaking'},
['Firemaking'] = {'mastery', 'firemaking'},
['Cooking'] = {'artisanitems'},
['Cooking'] = {'mastery', 'artisanitems'},
['Mining'] = {'gatheringitems'},
['Mining'] = {'mastery', 'gatheringitems'},
['Smithing'] = {'artisanitems'},
['Smithing'] = {'mastery', 'artisanitems'},
['Thieving'] = {'thieving'},
['Thieving'] = {'mastery', 'thieving'},
['Fletching'] = {'artisanitems'},
['Fletching'] = {'mastery', 'artisanitems'},
['Crafting'] = {'artisanitems'},
['Crafting'] = {'mastery', 'artisanitems'},
['Runecrafting'] = {'artisanitems'},
['Runecrafting'] = {'mastery', 'artisanitems'},
['Herblore'] = {'artisanitems'},
['Herblore'] = {'mastery', 'artisanitems'},
['Agility'] = {'agilityslots'},
['Agility'] = {'mastery', 'agilityslots'},
['Summoning'] = {'artisanitems'},
['Summoning'] = {'mastery', 'artisanitems'},
['Astrology'] = {'constellations'},
['Astrology'] = {'mastery', 'constellations'},
['Alt. Magic'] = {'altmagic'},
['Alt. Magic'] = {'altmagic'},
}
}
Line 1,285: Line 1,285:
table.insert(entityList, processed)
table.insert(entityList, processed)
end
end
return entityList
end
function p._addSkillMastery(entityList, skillName)
-- Add the "Skill Mastery" perk when relevant
table.insert(entityList, {['entityName'] = 'Skill Mastery', ['entityType'] = 'special', ['subType'] = 'skillmastery', ['skillLevel'] = 99, ['otherReqs'] = {}})
return entityList
return entityList
Line 1,302: Line 1,309:
['farmingplots'] = p._addFarmingPlots,
['farmingplots'] = p._addFarmingPlots,
['townshipunlocks'] = p._addTownshipUnlocks,
['townshipunlocks'] = p._addTownshipUnlocks,
['agilityslots'] = p._addAgilityObstacleSlotsAndPillars
['agilityslots'] = p._addAgilityObstacleSlotsAndPillars,
['mastery'] = p._addSkillMastery
}
}


Line 1,357: Line 1,365:
if entity.overrideText then
if entity.overrideText then
return entity.overrideText
return entity.overrideText
end
if entity.subType == 'skillmastery' then
return 'Gain ' .. Icons.Icon({skillName, type='skill', notext='true'}) .. '[[Mastery#The_Mastery_Pool|Skill Mastery]]'
end
end
if skillName == 'Farming' and entity.seed then
if skillName == 'Farming' and entity.seed then
Line 1,399: Line 1,410:
end
end
if entity.entityType == 'shop' then
if entity.entityType == 'shop' then
--[[if entity.entity.contains.petID then
iconType = 'pet'
elseif entity.subType == 'melvorD:SkillUpgrades' then
iconType = 'upgrade'
else
iconType = 'item'
end
--]]
iconType = string.lower(entity.subType)
iconType = string.lower(entity.subType)
end
end
73

edits