73
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
--This module polls various game data sources to produce a full list of skill | -- This module polls various game data sources to produce a full list of skill | ||
--level unlocks for each skill. The game has a hard-coded set of "milestones" | -- level unlocks for each skill. The game has a hard-coded set of "milestones" | ||
--for each skill that does the same thing, but it is not exhaustive and not | -- for each skill that does the same thing, but it is not exhaustive and not | ||
--permanently visible for most combat skills. | -- permanently visible for most combat skills. | ||
-- TODO: Args to filter by level range and unlock type | |||
local Shared = require('Module:Shared') | local Shared = require('Module:Shared') | ||
Line 50: | Line 52: | ||
['plot'] = 4, | ['plot'] = 4, | ||
['obstacleslot'] = 5, | ['obstacleslot'] = 5, | ||
['spell'] = | ['pillar'] = 6, | ||
['prayer'] = | ['spell'] = 7, | ||
['thieving'] = | ['prayer'] = 8, | ||
['constellation'] = | ['thieving'] = 9, | ||
['gathering'] = | ['constellation'] = 10, | ||
['artisan'] = | ['gathering'] = 11, | ||
['item'] = | ['artisan'] = 12, | ||
['combatArea'] = | ['item'] = 13, | ||
['slayerArea'] = | ['combatArea'] = 14, | ||
['dungeon'] = | ['slayerArea'] = 15, | ||
['shop'] = | ['dungeon'] = 16, | ||
['trader'] = | ['shop'] = 17, | ||
['obstacle'] = | ['trader'] = 18, | ||
['obstacle'] = 19 | |||
} | } | ||
local VERBS_PER_SUBTYPE = { | local VERBS_PER_SUBTYPE = { | ||
Line 87: | Line 90: | ||
['ancient'] = 'Cast', | ['ancient'] = 'Cast', | ||
['archaic'] = 'Cast', | ['archaic'] = 'Cast', | ||
['prayer'] = ' | ['prayer'] = 'Use', | ||
['altMagic'] = 'Cast', | ['altMagic'] = 'Cast', | ||
['tree'] = 'Cut', | ['tree'] = 'Cut', | ||
Line 867: | Line 870: | ||
end | end | ||
end | end | ||
return otherReqs | return otherReqs | ||
Line 926: | Line 918: | ||
local entityType = args.type | local entityType = args.type | ||
local typeParam = args.typeParam | local typeParam = args.typeParam | ||
local subType = args.subType | local subType = args.subType | ||
local subTypeParam = args.subTypeParam | local subTypeParam = args.subTypeParam | ||
Line 955: | Line 946: | ||
end) | end) | ||
for i, item in ipairs(itemList) do | for i, item in ipairs(itemList) do | ||
local processed = {} | local processed = {} | ||
Line 982: | Line 972: | ||
end) | end) | ||
for i, area in ipairs(areaList) do | for i, area in ipairs(areaList) do | ||
local processed = {} | local processed = {} | ||
Line 1,213: | Line 1,202: | ||
-- Manually add pillars | -- Manually add pillars | ||
table.insert(entityList, {['entityName'] = 'Passive Pillars', ['entityType'] = ' | table.insert(entityList, {['entityName'] = 'Passive Pillars', ['entityType'] = 'pillar', ['subType'] = 'pillar', ['skillLevel'] = 99, ['otherReqs'] = {}}) | ||
table.insert(entityList, {['entityName'] = 'Elite Passive Pillars', ['entityType'] = ' | table.insert(entityList, {['entityName'] = 'Elite Passive Pillars', ['entityType'] = 'pillar', ['subType'] = 'pillar', ['skillLevel'] = 120, ['otherReqs'] = {}}) | ||
return entityList | return entityList | ||
Line 1,325: | Line 1,314: | ||
else | else | ||
for i, req in ipairs(entity.otherReqs) do | for i, req in ipairs(entity.otherReqs) do | ||
-- TODO: "Completion" requirement | -- TODO: "Completion" requirement? Might not be needed | ||
if req.type == 'SkillLevel' then | if req.type == 'SkillLevel' then | ||
local skillInfo = Icons.Icon({Constants.getSkillName(req.skillID), type='skill', notext='true'}) .. ' ' .. req.level | local skillInfo = Icons.Icon({Constants.getSkillName(req.skillID), type='skill', notext='true'}) .. ' ' .. req.level | ||
Line 1,350: | Line 1,338: | ||
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, Shared.formatnum(req.mastery) .. ' ' .. Icons.Icon({req.skill, type='skill', notext=true}) .. ' ' .. Icons.Icon({'Mastery'})) | ||
elseif req.type == 'TownshipBuilding' then | |||
local building = Township._getBuildingByID(req.buildingID) | |||
table.insert(extraReqs, Icons.Icon({building.name, type='building', qty=req.count})) | |||
end | end | ||
end | end | ||
Line 1,420: | Line 1,411: | ||
end | end | ||
if entity.entityType == 'obstacle' then | if entity.entityType == 'obstacle' then | ||
iconType = 'agility' | |||
end | |||
if entity.entityType == 'obstacleslot' then | |||
iconType = 'agility' | iconType = 'agility' | ||
iconLink = 'Obstacles' | iconLink = 'Obstacles' | ||
end | end | ||
if entity.entityType == ' | if entity.entityType == 'pillar' then | ||
iconType = 'agility' | iconType = 'agility' | ||
iconLink = 'Passive_Pillars' | iconLink = 'Passive_Pillars' |
edits