Module:Skills/Gathering: Difference between revisions

Fix Mining pickaxe requirement issue
(Left align sources column)
(Fix Mining pickaxe requirement issue)
Line 21: Line 21:
table.insert(reqText, Shared.formatnum(recipe.totalMasteryRequired) .. ' ' .. Icons.Icon({skillName, type='skill', notext=true}) .. ' ' .. Icons.Icon({'Mastery'}))
table.insert(reqText, Shared.formatnum(recipe.totalMasteryRequired) .. ' ' .. Icons.Icon({skillName, type='skill', notext=true}) .. ' ' .. Icons.Icon({'Mastery'}))
end
end
local reqsData = {}
if type(recipe.requirements) == 'table' then
if type(recipe.requirements) == 'table' then
local reqs = Common.getRequirementString(recipe.requirements)
reqsData = Shared.shallowClone(recipe.requirements)
end
if recipe.shopItemPurchased ~= nil then
-- Mining requirements are stored differently than other skills like
-- Woodcutting, standardize here
table.insert(reqsData, {
["type"] = 'ShopPurchase',
["purchaseID"] = recipe.shopItemPurchased,
["count"] = 1
})
end
if not Shared.tableIsEmpty(reqsData) then
local reqs = Common.getRequirementString(reqsData)
if reqs ~= nil then
if reqs ~= nil then
table.insert(reqText, reqs)
table.insert(reqText, reqs)