Anonymous

Module:SkillUnlocks: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 119: Line 119:
-- Header and columns
-- Header and columns
local resultPart = {}
local resultPart = {}
table.insert(resultPart, '{| class="wikitable"\r\n|-class="headerRow-0"')
table.insert(resultPart, '{| class="wikitable"\r\n|- class="headerRow-0"')
table.insert(resultPart, '\r\n!' .. Icons.Icon({skillName, type='skill', notext='true'}) .. ' Level')
table.insert(resultPart, '\r\n!' .. Icons.Icon({skillName, type='skill', notext='true'}) .. ' Level')
table.insert(resultPart, '\r\n!Unlocks')
table.insert(resultPart, '\r\n!Unlocks')
Line 139: Line 139:
end
end
-- Append entity to the column
-- What are you doing with the thing you unlock?
local verb = ''
local verb = ''
if Shared.contains(VERBS_PER_SUBTYPE, entity.subType) then
if VERBS_PER_SUBTYPE[entity.subType] then
verb = VERBS_PER_SUBTYPE[entity.subType] .. ' '
verb = VERBS_PER_SUBTYPE[entity.subType] .. ' '
end
end
table.insert(resultPart, verb .. Icons.Icon({entity.entityName, type=entity.entityType}))
-- Icon overrides
local iconType = entity.entityType
if entity.entityType == 'slayerArea' then
iconType = 'combatArea'
end
-- Append entity to the column
table.insert(resultPart, verb .. Icons.Icon({entity.entityName, type=iconType}))
end
end
73

edits