17,101
edits
(Use tabs instead of spaces for indentation) |
(Update for v1.0.2) |
||
Line 170: | Line 170: | ||
-- Compile list of potions to be included | -- Compile list of potions to be included | ||
local potList = {} | local potList = {} | ||
for i, potData in ipairs(SkillData.Herblore. | for i, potData in ipairs(SkillData.Herblore.Potions) do | ||
if potList[potData.category] == nil then | if potList[potData.category] == nil then | ||
potList[potData.category] = {} | potList[potData.category] = {} | ||
end | end | ||
local potFirstItem = Items.getItemByID(potData. | local potFirstItem = Items.getItemByID(potData.potionIDs[1]) | ||
local potName = string.gsub(potFirstItem.name, ' Potion [IV]+$', '') | local potName = string.gsub(potFirstItem.name, ' Potion [IV]+$', '') | ||
table.insert(potList[potData.category], { ["name"] = potName, ["order"] = potData.level, ["img"] = potFirstItem.name }) | table.insert(potList[potData.category], { ["name"] = potName, ["order"] = potData.level, ["img"] = potFirstItem.name }) |