73
edits
No edit summary |
No edit summary |
||
Line 44: | Line 44: | ||
['Agile Wings Rapier'] = 'Weapon' | ['Agile Wings Rapier'] = 'Weapon' | ||
} | } | ||
function p._getEntityTrueSubtype(entityType, entityName) | |||
-- Corrects types of a few entities with misleading/wrong data | |||
if SUBTYPE_OVERRIDES[entityName] then | |||
entityType = SUBTYPE_OVERRIDES[entityName] | |||
end | |||
return entityType | |||
end | |||
function p._addItemsWithSkillRequirement(entityList, skillName) | function p._addItemsWithSkillRequirement(entityList, skillName) | ||
Line 62: | Line 70: | ||
processed.entityName = item.name | processed.entityName = item.name | ||
processed.entityType = 'item' | processed.entityType = 'item' | ||
processed.subType = item.type | processed.subType = p._getEntityTrueSubtype(item.type, item.name) | ||
processed.skillLevel = Items._getItemStat(item, skillReqLabel) | processed.skillLevel = Items._getItemStat(item, skillReqLabel) | ||
table.insert(entityList, processed) | table.insert(entityList, processed) | ||
Line 87: | Line 95: | ||
processed.entityName = area.name | processed.entityName = area.name | ||
processed.entityType = area.type | processed.entityType = area.type | ||
processed.subType = area.type | processed.subType = p._getEntityTrueSubtype(area.type, area.name) | ||
for a, req in ipairs(area.entryRequirements) do | for a, req in ipairs(area.entryRequirements) do | ||
if req.type == 'SkillLevel' and req.skillID == Constants.getSkillID(skillName) then | if req.type == 'SkillLevel' and req.skillID == Constants.getSkillID(skillName) then | ||
Line 154: | Line 162: | ||
-- What are you doing with the thing you unlock? ("verbs") | -- What are you doing with the thing you unlock? ("verbs") | ||
local verb = '' | local verb = '' | ||
if VERBS_PER_SUBTYPE[entity.subType] then | if VERBS_PER_SUBTYPE[entity.subType] then |
edits