Anonymous

Module:Shop: Difference between revisions

From Melvor Idle
5,912 bytes added ,  27 December 2022
Use printError function
(_getPurchaseStat: Return proper descriptions)
(Use printError function)
(14 intermediate revisions by 3 users not shown)
Line 6: Line 6:
local Items = require('Module:Items')
local Items = require('Module:Items')
local Icons = require('Module:Icons')
local Icons = require('Module:Icons')
local Pets = require('Module:Pets')


-- Overrides for various items, mostly relating to icon overrides
-- Overrides for various items, mostly relating to icon overrides
Line 52: Line 53:
return p._getPurchaseBuyLimit(purchase, not displayInline)
return p._getPurchaseBuyLimit(purchase, not displayInline)
elseif stat == 'description' then
elseif stat == 'description' then
return p._getPurchaseDescription(purch)
return p._getPurchaseDescription(purchase)
elseif stat =='expansionicon' then
return p._getPurchaseExpansionIcon(purchase)
else
else
return purchase[stat]
return purchase[stat]
Line 60: Line 63:
function p.getPurchaseStat(frame)
function p.getPurchaseStat(frame)
local args = frame.args ~= nil and frame.args or frame
local args = frame.args ~= nil and frame.args or frame
local purchaseName = args[1]
local purchaseName = Shared.fixPagename(args[1])
local statName = args[2]
local statName = args[2]
local displayInline = (args['inline'] ~= nil and string.lower(args['inline']) == 'true' or false)
local displayInline = (args['inline'] ~= nil and string.lower(args['inline']) == 'true' or false)
Line 72: Line 75:


if Shared.tableIsEmpty(purchaseList) then
if Shared.tableIsEmpty(purchaseList) then
return "ERROR: Couldn't find purchase with name '" .. purchaseName .. "'[[Category:Pages with script errors]]"
return Shared.printError("Couldn't find purchase with name '" .. purchaseName .. "'")
else
else
local resultPart = {}
local resultPart = {}
Line 96: Line 99:
         end
         end
         if purch.contains.petID ~= nil then
         if purch.contains.petID ~= nil then
             local pet = GameData.getEntityByID('pets', purch.contains.petID)
             local pet = Pets.getPetByID(purch.contains.petID)
             if pet ~= nil then
             if pet ~= nil then
                 return pet.name
                 return pet.name
             end
             end
        end
    end
    return ''
end
function p._getPurchaseExpansionIcon(purch)
    if purch.id ~= nil then
        return Icons.getExpansionIcon(purch.id)
    elseif purch.contains ~= nil then
    local item = nil
        if purch.contains.items ~= nil and not Shared.tableIsEmpty(purch.contains.items) then
            return Icons.getExpansionIcon(purch.contains.items[1].id)
        elseif purch.contains.itemCharges ~= nil and not Shared.tableIsEmpty(purch.contains.itemCharges) then
        return Icons.getExpansionIcon(purch.contains.itemCharges.id)
        end
       
        if purch.contains.petID ~= nil then
return Icons.getExpansionIcon(purch.contains.petID)
         end
         end
     end
     end
Line 113: Line 134:
if purch.contains.modifiers ~= nil then
if purch.contains.modifiers ~= nil then
return Constants.getModifiersText(purch.contains.modifiers, false)
return Constants.getModifiersText(purch.contains.modifiers, false)
elseif purch.contains.petID ~= nil then
            local pet = Pets.getPetByID(purch.contains.petID)
            return Pets._getPetEffect(pet)
elseif purch.contains.items ~= nil and Shared.tableCount(purch.contains.items) == 1 then
elseif purch.contains.items ~= nil and Shared.tableCount(purch.contains.items) == 1 then
item = Items.getItemByID(purch.contains.items[1].id)
item = Items.getItemByID(purch.contains.items[1].id)
Line 241: Line 265:
         end
         end
         elseif req.type == 'Completion' then
         elseif req.type == 'Completion' then
             local ns = GameData.getEntityByID('namespaces', req.namespace)
             local ns = GameData.getEntityByName('namespaces', req.namespace)
             if ns ~= nil then
             if ns ~= nil then
                 table.insert(reqArray, req.percent .. '% ' .. ns.displayName .. ' Completion')
                 table.insert(reqArray, req.percent .. '% ' .. ns.displayName .. ' Completion')
Line 259: Line 283:
             table.insert(reqArray, reqText)
             table.insert(reqArray, reqText)
         else
         else
             table.insert(reqArray, 'ERROR: Unknown requirement: ' .. (req.type or 'nil') .. '[[Category:Pages with script errors]]')
             table.insert(reqArray, Shared.printError('Unknown requirement: ' .. (req.type or 'nil')))
         end
         end
     end
     end
Line 273: Line 297:
if purchase.contains == nil then
if purchase.contains == nil then
return 'Unknown'
return 'Unknown'
elseif purchase.contains.pet ~= nil then
elseif purchase.contains.petID ~= nil then
return 'Pet'
return 'Pet'
elseif purchase.contains.itemCharges ~= nil then
elseif purchase.contains.itemCharges ~= nil then
Line 306: Line 330:
GPTotal = GPTotal + GPVal
GPTotal = GPTotal + GPVal
table.insert(containArray, '|-\r\n| style="min-width:25px"| ' .. Icons.Icon({item.name, type='item', notext=true, size='25'}))
table.insert(containArray, '|-\r\n| style="min-width:25px"| ' .. Icons.Icon({item.name, type='item', notext=true, size='25'}))
table.insert(containArray, '| ' .. Icons.Icon({item.name, type='item', noicon=true}) .. '\r\n| data-sort-value="' .. itemQty .. '" style="text-align:right" | ' .. Shared.formatnum(itemQty))
table.insert(containArray, '|data-sort-value="'..item.name..'"|'.. Icons.getExpansionIcon(item.id) .. Icons.Icon({item.name, type='item', noicon=true}) .. '\r\n| data-sort-value="' .. itemQty .. '" style="text-align:right" | ' .. Shared.formatnum(itemQty))
table.insert(containArray, '| data-sort-value="' .. GPVal .. '"| ' .. Icons.GP(GPVal))
table.insert(containArray, '| data-sort-value="' .. GPVal .. '"| ' .. Icons.GP(GPVal))
end
end
Line 340: Line 364:


if purchase == nil then
if purchase == nil then
return "ERROR: Couldn't find purchase with name '" .. purchaseName .. "'[[Category:Pages with script errors]]"
return Shared.printError("Couldn't find purchase with name '" .. purchaseName .. "'")
else
else
return p._getPurchaseContents(purchase, asList)
return p._getPurchaseContents(purchase, asList)
Line 381: Line 405:
if purchase == nil then
if purchase == nil then
return "ERROR: Couldn't find purchase with name '" .. purchaseName .. "'[[Category:Pages with script errors]]"
return Shared.printError("Couldn't find purchase with name '" .. purchaseName .. "'")
else
else
return p._getPurchaseBuyLimit(purchase, asList)
return p._getPurchaseBuyLimit(purchase, asList)
Line 409: Line 433:
function p.getPurchaseIcon(frame)
function p.getPurchaseIcon(frame)
local args = frame.args ~= nil and frame.args or frame
local args = frame.args ~= nil and frame.args or frame
local purchaseName = args[1]
local purchaseName = Shared.fixPagename(args[1])
local purchase = p.getPurchase(purchaseName)
local purchase = p.getPurchase(purchaseName)


if purchase == nil then
if purchase == nil then
return "ERROR: Couldn't find purchase with name '" .. tostring(purchaseName) .. "'[[Category:Pages with script errors]]"
return Shared.printError("Couldn't find purchase with name '" .. tostring(purchaseName) .. "'")
else
else
args[1] = purchase
args[1] = purchase
Line 498: Line 522:
for i, purchase in ipairs(Purchases) do
for i, purchase in ipairs(Purchases) do
         local purchName = p._getPurchaseName(purchase)
         local purchName = p._getPurchaseName(purchase)
        local purchExpIcon = p._getPurchaseExpansionIcon(purchase)
local purchOverride = nil
local purchOverride = nil
if purchOverrides ~= nil then
if purchOverrides ~= nil then
Line 515: Line 540:
end
end


        local purchSortName = purchName
if iconNoLink == nil or iconNoLink ~= true then purchName = '[[' .. purchLink .. purchName .. ']]' end
if iconNoLink == nil or iconNoLink ~= true then purchName = '[[' .. purchLink .. purchName .. ']]' end


Line 522: Line 548:
table.insert(resultPart, '|style="min-width:25px"|' .. p._getPurchaseIcon({purchase, notext=true, size='50'}))
table.insert(resultPart, '|style="min-width:25px"|' .. p._getPurchaseIcon({purchase, notext=true, size='50'}))
--table.insert(resultPart, '|style="min-width:25px"|' .. Icons.Icon({iconName, type=iconType, notext=true, nolink=iconNoLink, size='50'}))
--table.insert(resultPart, '|style="min-width:25px"|' .. Icons.Icon({iconName, type=iconType, notext=true, nolink=iconNoLink, size='50'}))
table.insert(resultPart, '| ' .. purchName)
table.insert(resultPart, '| data-sort-value="'..purchSortName..'"|'..purchExpIcon .. purchName)
elseif column == 'Type' then
elseif column == 'Type' then
table.insert(resultPart, '| ' .. purchType)
table.insert(resultPart, '| ' .. purchType)
Line 580: Line 606:
     local shopCat = GameData.getEntityByName('shopCategories', cat)
     local shopCat = GameData.getEntityByName('shopCategories', cat)
if shopCat == nil then
if shopCat == nil then
return 'ERROR: Invalid category '..cat..'[[Category:Pages with script errors]]'
return Shared.printError('Invalid category ' .. cat)
else
else
         local catPurchases = p.getPurchases(function(purch) return purch.category == shopCat.id end)
         local catPurchases = p.getPurchases(function(purch) return purch.category == shopCat.id end)
Line 626: Line 652:
result = result..'\r\n!colspan="2"|'..Icons.Icon({'Shop'})..' Purchase'
result = result..'\r\n!colspan="2"|'..Icons.Icon({'Shop'})..' Purchase'
if purchase.contains.items ~= nil and Shared.tableCount(purchase.contains.items) > 1 then
if purchase.contains.items ~= nil and Shared.tableCount(purchase.contains.items) > 1 then
result = result..' - '..Icons.Icon({p._getPurchaseName(purchase), type='item'})
result = result..' - '..p._getPurchaseExpansionIcon(purchase)..Icons.Icon({p._getPurchaseName(purchase), type='item'})
end
end


Line 657: Line 683:
local item = Items.getItem(itemName)
local item = Items.getItem(itemName)
if item == nil then
if item == nil then
return "ERROR: No item named "..itemName.." exists in the data module"
return Shared.printError('No item named ' .. itemName .. ' exists in the data module')
end
end


Line 710: Line 736:
if capeItem ~= nil then
if capeItem ~= nil then
table.insert(resultPart, '\r\n|-\r\n| ' .. Icons.Icon({capeItem.name, type='item', size='60', notext=true}))
table.insert(resultPart, '\r\n|-\r\n| ' .. Icons.Icon({capeItem.name, type='item', size='60', notext=true}))
table.insert(resultPart, '\r\n| ' .. Icons.Icon({capeItem.name, type='item', noicon=true}))
table.insert(resultPart, '\r\n| data-sort-value="'..capeItem.name..'"|'..Icons.getExpansionIcon(capeItem.id) .. Icons.Icon({capeItem.name, type='item', noicon=true}))
table.insert(resultPart, '\r\n| ' .. p.getRequirementString(cape.purchaseRequirements))
table.insert(resultPart, '\r\n| ' .. p.getRequirementString(cape.purchaseRequirements))
table.insert(resultPart, '\r\n| ' .. p._getPurchaseDescription(cape))
table.insert(resultPart, '\r\n| ' .. p._getPurchaseDescription(cape))
Line 786: Line 812:
local dung = getGodDungeon(upgrade.purchaseRequirements)
local dung = getGodDungeon(upgrade.purchaseRequirements)
local costSortValue = p._getPurchaseSortValue(upgrade)
local costSortValue = p._getPurchaseSortValue(upgrade)
table.insert(resultPart, '|-\r\n|style="min-width:25px; text-align:center;" data-sort-value="' .. upgradeName .. '"| ' .. Icons.Icon({upgradeName, type='upgrade', size=50, notext=true}))
table.insert(resultPart, '|-\r\n|style="min-width:25px; text-align:center;" data-sort-value="' .. upgradeName .. '"| ' ..p._getPurchaseExpansionIcon(upgrade).. Icons.Icon({upgradeName, type='upgrade', size=50, notext=true}))
table.insert(resultPart, '| ' .. Icons.Icon({upgradeName, type='upgrade', noicon=true}))
table.insert(resultPart, '| ' .. Icons.Icon({upgradeName, type='upgrade', noicon=true}))
table.insert(resultPart, '| ' .. p._getPurchaseDescription(upgrade))
table.insert(resultPart, '| ' .. p._getPurchaseDescription(upgrade))
Line 797: Line 823:
end
end


function p.getCookingUtilityTable(frame)
function p.getToolTable(toolName, searchString, modifiers, skillID)
local category = nil
local skillName = nil
if frame ~= nil then category = frame.args ~= nil and frame.args[1] or frame end
if type(skillID) == 'string' then
local validCategories = {'Cooking Fire', 'Furnace', 'Pot'}
skillName = Constants.getSkillName(skillID)
if category == nil or not Shared.contains({'Cooking Fire', 'Furnace', 'Pot'}, category) then
end
return 'ERROR: Invalid category specified. Must be one of the following: ' .. mw.text.listToText(validCategories, ', ', ' or ')
local toolArray = p.getPurchases(
function(purch)
return purch.category == 'melvorD:SkillUpgrades' and string.find(purch.id, searchString) ~= nil
end)
 
if Shared.tableIsEmpty(toolArray) then
return ''
end
if modifiers == nil then
modifiers = {}
end
end
 
local categoryShort = string.match(category, '[^%s]+$')
local modTotal = {}
local bonusSkillID = Constants.getSkillID('Cooking')
for i, modDef in ipairs(modifiers) do
local bonusColMod, bonusColName = nil, nil
modTotal[modDef.name] = 0
if category == 'Cooking Fire' then
bonusColMod = 'increasedSkillXP'
bonusColName = 'Bonus ' .. Icons.Icon({'Cooking', type='skill', notext=true}) .. ' XP'
else
bonusColMod = 'increasedChanceToDoubleItemsSkill'
bonusColName = 'Double Items Chance'
end
end
local modsPerfectChance = {'increasedChancePerfectCookFire', 'increasedChancePerfectCookFurnace',
 
'increasedChancePerfectCookPot', 'increasedChancePerfectCookGlobal'}
local headerRowSpan = (Shared.tableIsEmpty(toolArray) and 1) or 2
local totalBonusVal, totalPerfectChance = 0, 0
local utilityList = p.getPurchases(function(purch) return purch.category == 'melvorD:SkillUpgrades' and string.find(p._getPurchaseName(purch), category .. '$') ~= nil end)
local resultPart = {}
local resultPart = {}
table.insert(resultPart, '{| class="wikitable"')
-- Table header
table.insert(resultPart, '\n!rowspan="' .. headerRowSpan .. '" colspan="2"| Name')
table.insert(resultPart, '{| class="wikitable stickyHeader"')
table.insert(resultPart, '\n!rowspan="' .. headerRowSpan .. '"| ' .. (skillName == nil and 'Requirements' or Icons.Icon({skillName, type='skill', notext=true}) .. ' Level'))
table.insert(resultPart, '|- class="headerRow-0"')
table.insert(resultPart, '\n!rowspan="' .. headerRowSpan .. '"| Cost')
table.insert(resultPart, '!colspan="4"| !!colspan="2"|' .. bonusColName .. '!!colspan="2"|Bonus Perfect Chance')
for i, modDef in ipairs(modifiers) do
table.insert(resultPart, '|- class="headerRow-1"')
modTotal[modDef.name] = 0
table.insert(resultPart, '!colspan="2"|Name!!Level!!Cost' .. string.rep('!!This ' .. categoryShort .. '!!Total', 2))
table.insert(resultPart, '\n!colspan="2"| ' .. modDef.header)
end
if headerRowSpan > 1 then
table.insert(resultPart, '\n|-' .. string.rep('\n!This ' .. toolName .. '\n!Total', Shared.tableCount(modifiers)))
end
 
for i, tool in ipairs(toolArray) do
local toolName = p._getPurchaseName(tool)
local toolCost = p.getCostString(tool.cost, false)
local toolCostSort = p._getPurchaseSortValue(tool) or 0
table.insert(resultPart, '\n|-')
table.insert(resultPart, '\n|style="min-width:25px" data-sort-value="' .. toolName .. '"| ' .. Icons.Icon({toolName, type='upgrade', size='50', notext=true}))
table.insert(resultPart, '\n| data-sort-value="' .. toolName.. '"|' .. Icons.getExpansionIcon(tool.id) .. toolName)
local level, levelStyle = nil, nil
if skillID == nil then
level = 'None'
levelStyle = '|class="table-na"'
else
level = 1
levelStyle = '|style="text-align:right"'
end
if tool.purchaseRequirements ~= nil and not Shared.tableIsEmpty(tool.purchaseRequirements) then
if skillID == nil then
-- Return all requirements
level = p.getRequirementString(tool.purchaseRequirements)
if level ~= 'None' then
levelStyle = ''
end
else
-- Return level requirement for just the specified skill
for i, purchReq in ipairs(tool.purchaseRequirements) do
if purchReq.type == 'SkillLevel' and purchReq.skillID == skillID then
level = purchReq.level
break
end
end
end
end
table.insert(resultPart, '\n' .. levelStyle .. '| '..level)
table.insert(resultPart, '\n|style="text-align:right" data-sort-value="' .. toolCostSort .. '"| ' .. toolCost)


-- Row for each upgrade
local cellStart = '\n|style="text-align:right"'
for i, utility in ipairs(utilityList) do
if tool.contains ~= nil and tool.contains.modifiers ~= nil then
        local utilityName = p._getPurchaseName(utility)
for j, modDef in ipairs(modifiers) do
-- First determine bonus XP/doubling chance and perfect chance
local modName = modDef.name
local bonusVal, perfectChance = 0, 0
local modVal = tool.contains.modifiers[modName]
if type(utility.contains) == 'table' then
if modVal ~= nil then
if type(utility.contains.modifiers) == 'table' then
if type(modVal) == 'table' and type(modVal[1]) == 'table' and modVal[1].skillID ~= nil and (modDef.skillID == nil or modDef.skillID == modVal[1].skillID) then
for modName, modVal in pairs(utility.contains.modifiers) do
modVal = modVal[1].value
if modName == bonusColMod and type(modVal) == 'table' then
-- Bonus XP/doubling
for skID, skVal in pairs(modVal) do
if skVal[1] == bonusSkillID then bonusVal = bonusVal + skVal[2] end
end
elseif Shared.contains(modsPerfectChance, modName) then
-- Perfect chance
perfectChance = perfectChance + modVal
end
end
modTotal[modName] = modTotal[modName] + modVal
else
modVal = 0
end
end
local cellStartVal = cellStart .. ((modVal == 0 and ' class="table-na"') or '')
local cellStartTot = cellStart .. ((modTotal[modName] == 0 and ' class="table-na"') or '')
table.insert(resultPart, cellStartVal .. '| ' .. (modVal == 0 and '' or modDef.sign) .. modVal .. modDef.suffix)
table.insert(resultPart, cellStartTot .. '| ' .. (modTotal[modName] == 0 and '' or modDef.sign) .. modTotal[modName] .. modDef.suffix)
end
end
end
end
totalBonusVal = totalBonusVal + bonusVal
end
totalPerfectChance = totalPerfectChance + perfectChance
 
table.insert(resultPart, '\n|}')
return table.concat(resultPart)
end
 
function p.getAxeTable(frame)
local modifiers = {
{ name = 'decreasedSkillIntervalPercent', header = 'Cut Time Decrease', sign = '-', suffix = '%' },
{ name = 'increasedChanceToDoubleItemsSkill', header = 'Double Items Chance', sign = '+', suffix = '%' },
{ name = 'increasedBirdNestDropRate', header = Icons.Icon({'Bird Nest', 'Drop Chance', type='item', nolink=true}), sign = '+', suffix = '%' },
{ name = 'increasedChanceForAshInWoodcutting', header = Icons.Icon({'Ash', 'Drop Chance', type='item', nolink=true}), sign = '+', suffix = '%' }
}
return p.getToolTable('Axe', '_Axe$', modifiers, 'melvorD:Woodcutting')
end


table.insert(resultPart, '|-')
function p.getPickaxeTable(frame)
table.insert(resultPart, '|style="min-width:25px"|' .. Icons.Icon({utilityName, type='upgrade', size='50', notext=true}))
local modifiers = {
table.insert(resultPart, '|' .. utilityName)
{ name = 'decreasedSkillIntervalPercent', header = 'Mining Time Decrease', sign = '-', suffix = '%' },
table.insert(resultPart, '|style="text-align:right"|' .. p.getRequirementString(utility.purchaseRequirements))
{ name = 'increasedChanceToDoubleOres', header = '2x Ore Chance', sign = '+', suffix = '%' },
table.insert(resultPart, '|style="text-align:right"|' .. p.getCostString(utility.cost, false))
{ name = 'increasedChanceForOneExtraOre', header = '+1 Ore Chance', sign = '+', suffix = '%' },
table.insert(resultPart, '|style="text-align:right"|' .. '+' .. bonusVal .. '%')
{ name = 'increasedChanceForQualitySuperiorGem', header = 'Superior Gem Chance', sign = '+', suffix = '%' },
table.insert(resultPart, '|style="text-align:right"|' .. '+' .. totalBonusVal .. '%')
{ name = 'increasedMeteoriteOre', header = 'Increased ' .. Icons.Icon({'Meteorite Ore', type='item', notext=true}), sign = '+', suffix = '' }
table.insert(resultPart, '|style="text-align:right"|' .. '+' .. perfectChance .. '%')
}
table.insert(resultPart, '|style="text-align:right"|' .. '+' .. totalPerfectChance .. '%')
 
return p.getToolTable('Pickaxe', '_Pickaxe$', modifiers, 'melvorD:Mining')
end
 
function p.getRodTable(frame)
local modifiers = {
{ name = 'decreasedSkillIntervalPercent', header = 'Catch Time Decrease', sign = '-', suffix = '%' },
{ name = 'increasedChanceForOneExtraFish', header = '+1 Fish Chance', sign = '+', suffix = '%' },
{ name = 'increasedChanceToFindLostChest', header = Icons.Icon({'Lost Chest', type='item', notext=true}) .. ' Chance', sign = '+', suffix = '%' },
{ name = 'increasedFishingCookedChance', header = 'Cooked Fish Chance', sign = '+', suffix = '%' }
}
 
return p.getToolTable('Rod', '_Rod$', modifiers, 'melvorD:Fishing')
end
 
function p.getCookingUtilityTable(frame)
local category = nil
if frame ~= nil then category = frame.args ~= nil and frame.args[1] or frame end
local validCategories = {'Cooking Fire', 'Furnace', 'Pot'}
if category == nil or not Shared.contains({'Cooking Fire', 'Furnace', 'Pot'}, category) then
return Shared.printError('Invalid category specified. Must be one of the following: ' .. mw.text.listToText(validCategories, ', ', ' or '))
end
end
table.insert(resultPart, '|}')


return table.concat(resultPart, '\r\n')
local categoryShort = string.match(category, '[^%s]+$')
local modifiers = {
['Cooking Fire'] = {
{ name = 'increasedSkillXP', skillID = 'melvorD:Cooking', header = 'Bonus ' .. Icons.Icon({'Cooking', type='skill', notext=true}) .. ' XP', sign = '+', suffix = '%' },
{ name = 'increasedChancePerfectCookFire', header = 'Fire Perfect Cook Chance', sign ='+', suffix = '%' },
{ name = 'decreasedPassiveCookInterval', header = 'Passive Cook Time Decrease', sign = '-', suffix = '%' },
{ name = 'increasedChanceToDoubleItemsSkill', skillID = 'melvorD:Cooking', header = '2x Items Chance', sign = '+', suffix = '%' },
{ name = 'decreasedSkillIntervalPercent', skillID = 'melvorD:Cooking', header = 'Active Cook Time Decrease', sign = '-', suffix = '%' }
},
['Furnace'] = {
{ name = 'increasedChanceToDoubleItemsSkill', skillID = 'melvorD:Cooking', header = '2x Items Chance', sign = '+', suffix = '%' },
{ name = 'decreasedPassiveCookInterval', header = 'Passive Cook Time Decrease', sign = '-', suffix = '%' },
{ name = 'decreasedSkillIntervalPercent', skillID = 'melvorD:Cooking', header = 'Active Cook Time Decrease', sign = '-', suffix = '%' },
{ name = 'increasedChanceAdditionalSkillResource', skillID = 'melvorD:Cooking', header = '+1 Item Chance', sign = '+', suffix = '%' }
},
['Pot'] = {
{ name = 'increasedChanceToDoubleItemsSkill', skillID = 'melvorD:Cooking', header = '2x Items Chance', sign = '+', suffix = '%' },
{ name = 'decreasedPassiveCookInterval', header = 'Passive Cook Time Decrease', sign = '-', suffix = '%' },
{ name = 'decreasedSkillIntervalPercent', skillID = 'melvorD:Cooking', header = 'Active Cook Time Decrease', sign = '-', suffix = '%' },
{ name = 'increasedChanceAdditionalSkillResource', skillID = 'melvorD:Cooking', header = '+1 Item Chance', sign = '+', suffix = '%' }
}
}
 
return p.getToolTable(categoryShort, categoryShort .. '$', modifiers[category], nil)
end
end


return p
return p