17,105
edits
(getPotionTable: Move from Module:Items) |
(Try distinguish between TotH and base content in a lazy way) |
||
Line 222: | Line 222: | ||
return 'ERROR: The ' .. skillName .. ' skill is not supported by this function' | return 'ERROR: The ' .. skillName .. ' skill is not supported by this function' | ||
end | end | ||
-- Validation: Category | -- Validation: Category | ||
local category = GameData.getEntityByName(SkillData[skillName].categories, categoryName) | local category = GameData.getEntityByName(SkillData[skillName].categories, categoryName) | ||
Line 305: | Line 275: | ||
-- Build rows based on recipes | -- Build rows based on recipes | ||
for i, recipe in ipairs(recipeList) do | for i, recipe in ipairs(recipeList) do | ||
local ns, _ = GameData.getLocalID(recipe.id) | |||
local item = Items.getItemByID(recipe.productID) | local item = Items.getItemByID(recipe.productID) | ||
if item ~= nil then | if item ~= nil then | ||
Line 331: | Line 302: | ||
namePrefix = namePrefix .. 'data-sort-value="' .. item.name .. '"' | namePrefix = namePrefix .. 'data-sort-value="' .. item.name .. '"' | ||
end | end | ||
table.insert(resultPart, '\r\n|' .. spanStr .. 'style="text-align:center;min-width:25px"| ' .. Icons.Icon({item.name, type='item', size='50', notext=true})) | local suf = (ns == 'melvorTotH' and '<sup>*</sup>' or '') | ||
table.insert(resultPart, '\r\n|' .. spanStr .. 'style="text-align:center;min-width:25px"| ' .. Icons.Icon({item.name, type='item', size='50', notext=true}) .. suf) | |||
table.insert(resultPart, '\r\n|'.. (namePrefix ~= '' and namePrefix .. '| ' or ' ') .. (qty > 1 and '<b>' .. qty .. 'x</b> ' or '') .. Icons.Icon({item.name, type='item', noicon=true})) | table.insert(resultPart, '\r\n|'.. (namePrefix ~= '' and namePrefix .. '| ' or ' ') .. (qty > 1 and '<b>' .. qty .. 'x</b> ' or '') .. Icons.Icon({item.name, type='item', noicon=true})) | ||
elseif colID == 'SkillLevel' then | elseif colID == 'SkillLevel' then |