12,787
edits
(getRequirementString: Support 'ShopPurchase' requirement) |
(Use printError function) |
||
(19 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 44: | Line 45: | ||
return p.getCostString(purchase.cost, displayInline) | return p.getCostString(purchase.cost, displayInline) | ||
elseif stat == 'requirements' then | elseif stat == 'requirements' then | ||
return p.getRequirementString(purchase. | return p.getRequirementString(purchase.purchaseRequirements) | ||
elseif stat == 'contents' then | elseif stat == 'contents' then | ||
return p._getPurchaseContents(purchase, true) | return p._getPurchaseContents(purchase, true) | ||
Line 51: | Line 52: | ||
elseif stat == 'buyLimit' then | elseif stat == 'buyLimit' then | ||
return p._getPurchaseBuyLimit(purchase, not displayInline) | return p._getPurchaseBuyLimit(purchase, not displayInline) | ||
elseif stat == 'description' then | |||
return p._getPurchaseDescription(purchase) | |||
elseif stat =='expansionicon' then | |||
return p._getPurchaseExpansionIcon(purchase) | |||
else | else | ||
return purchase[stat] | return purchase[stat] | ||
Line 58: | 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 70: | Line 75: | ||
if Shared.tableIsEmpty(purchaseList) then | if Shared.tableIsEmpty(purchaseList) then | ||
return " | return Shared.printError("Couldn't find purchase with name '" .. purchaseName .. "'") | ||
else | else | ||
local resultPart = {} | local resultPart = {} | ||
Line 94: | Line 99: | ||
end | end | ||
if purch.contains.petID ~= nil then | if purch.contains.petID ~= nil then | ||
local pet = | 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 105: | Line 128: | ||
function p._getPurchaseDescription(purch) | function p._getPurchaseDescription(purch) | ||
if purch.customDescription ~= nil then | if purch.customDescription ~= nil then | ||
return | local templateData = p._getPurchaseTemplateData(purch) | ||
return Shared.applyTemplateData(purch.customDescription, templateData) | |||
elseif purch.contains ~= nil then | elseif purch.contains ~= nil then | ||
local item = nil | local item = nil | ||
if purch.contains.items ~= nil and Shared.tableCount(purch.contains.items) == 1 then | if purch.contains.modifiers ~= nil then | ||
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 | |||
item = Items.getItemByID(purch.contains.items[1].id) | item = Items.getItemByID(purch.contains.items[1].id) | ||
elseif purch.contains.itemCharges ~= nil then | elseif purch.contains.itemCharges ~= nil then | ||
Line 157: | Line 186: | ||
return mw.text.listToText(costArray, sep, lastSep) | return mw.text.listToText(costArray, sep, lastSep) | ||
end | end | ||
end | |||
-- Generates description template data. See: shop.js, getDescriptionTemplateData() | |||
function p._getPurchaseTemplateData(purchase) | |||
-- qty is a static value of 1 for Bank slots | |||
local templateData = { qty = 1 } | |||
if purchase.contains ~= nil and purchase.contains.items ~= nil then | |||
for i, itemDef in ipairs(purchase.contains.items) do | |||
templateData['qty' .. i] = itemDef.quantity | |||
end | |||
end | |||
return templateData | |||
end | end | ||
Line 224: | Line 265: | ||
end | end | ||
elseif req.type == 'Completion' then | elseif req.type == 'Completion' then | ||
local ns = GameData. | 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 242: | Line 283: | ||
table.insert(reqArray, reqText) | table.insert(reqArray, reqText) | ||
else | else | ||
table.insert(reqArray, ' | table.insert(reqArray, Shared.printError('Unknown requirement: ' .. (req.type or 'nil'))) | ||
end | end | ||
end | end | ||
Line 256: | Line 297: | ||
if purchase.contains == nil then | if purchase.contains == nil then | ||
return 'Unknown' | return 'Unknown' | ||
elseif purchase.contains. | elseif purchase.contains.petID ~= nil then | ||
return 'Pet' | return 'Pet' | ||
elseif purchase.contains.itemCharges ~= nil then | elseif purchase.contains.itemCharges ~= nil then | ||
Line 289: | 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 323: | Line 364: | ||
if purchase == nil then | if purchase == nil then | ||
return " | return Shared.printError("Couldn't find purchase with name '" .. purchaseName .. "'") | ||
else | else | ||
return p._getPurchaseContents(purchase, asList) | return p._getPurchaseContents(purchase, asList) | ||
Line 364: | Line 405: | ||
if purchase == nil then | if purchase == nil then | ||
return " | return Shared.printError("Couldn't find purchase with name '" .. purchaseName .. "'") | ||
else | else | ||
return p._getPurchaseBuyLimit(purchase, asList) | return p._getPurchaseBuyLimit(purchase, asList) | ||
Line 392: | 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 " | return Shared.printError("Couldn't find purchase with name '" .. tostring(purchaseName) .. "'") | ||
else | else | ||
args[1] = purchase | args[1] = purchase | ||
Line 481: | 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 498: | 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 505: | 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 516: | Line 559: | ||
table.insert(resultPart, cellProp .. '| ' .. costString) | table.insert(resultPart, cellProp .. '| ' .. costString) | ||
elseif column == 'Requirements' then | elseif column == 'Requirements' then | ||
table.insert(resultPart, '| ' .. p.getRequirementString(purchase. | table.insert(resultPart, '| ' .. p.getRequirementString(purchase.purchaseRequirements)) | ||
elseif column == 'Buy Limit' then | elseif column == 'Buy Limit' then | ||
local buyLimit = p._getPurchaseBuyLimit(purchase, false) | local buyLimit = p._getPurchaseBuyLimit(purchase, false) | ||
Line 563: | Line 606: | ||
local shopCat = GameData.getEntityByName('shopCategories', cat) | local shopCat = GameData.getEntityByName('shopCategories', cat) | ||
if shopCat == nil then | if shopCat == nil then | ||
return ' | 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 609: | 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 616: | Line 659: | ||
result = result..'\r\n|-\r\n!style="text-align:right;"|Requirements' | result = result..'\r\n|-\r\n!style="text-align:right;"|Requirements' | ||
result = result..'\r\n|'..p.getRequirementString(purchase. | result = result..'\r\n|'..p.getRequirementString(purchase.purchaseRequirements) | ||
result = result..'\r\n|-\r\n!style="text-align:right;"|Contains' | result = result..'\r\n|-\r\n!style="text-align:right;"|Contains' | ||
Line 640: | Line 683: | ||
local item = Items.getItem(itemName) | local item = Items.getItem(itemName) | ||
if item == nil then | if item == nil then | ||
return | return Shared.printError('No item named ' .. itemName .. ' exists in the data module') | ||
end | end | ||
Line 647: | Line 690: | ||
function p.getShopMiscUpgradeTable() | function p.getShopMiscUpgradeTable() | ||
local purchList = p.getPurchases(function(purch) return purch.category == 'melvorD:General' and string.find(purch.id, '^melvorD:Auto_Eat') == nil end) | local purchList = p.getPurchases(function(purch) return (purch.category == 'melvorD:General' and string.find(purch.id, '^melvorD:Auto_Eat') == nil) or Shared.contains({'melvorTotH:SignOfTheStars', 'melvorTotH:SummonersAltar'}, purch.id) end) | ||
return p._getShopTable(purchList, { columns = { 'Purchase', 'Description', 'Cost', 'Requirements' }, purchaseHeader = 'Upgrade' }) | return p._getShopTable(purchList, { columns = { 'Purchase', 'Description', 'Cost', 'Requirements' }, purchaseHeader = 'Upgrade' }) | ||
Line 693: | 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 769: | 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 780: | Line 823: | ||
end | end | ||
function p. | function p.getToolTable(toolName, searchString, modifiers, skillID) | ||
local | local skillName = nil | ||
if | if type(skillID) == 'string' then | ||
local | skillName = Constants.getSkillName(skillID) | ||
if | end | ||
return ' | 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 | local modTotal = {} | ||
for i, modDef in ipairs(modifiers) do | |||
modTotal[modDef.name] = 0 | |||
end | end | ||
local headerRowSpan = (Shared.tableIsEmpty(toolArray) and 1) or 2 | |||
local | |||
local resultPart = {} | local resultPart = {} | ||
table.insert(resultPart, '{| class="wikitable"') | |||
table.insert(resultPart, '\n!rowspan="' .. headerRowSpan .. '" colspan="2"| Name') | |||
table.insert(resultPart, '{| class="wikitable | table.insert(resultPart, '\n!rowspan="' .. headerRowSpan .. '"| ' .. (skillName == nil and 'Requirements' or Icons.Icon({skillName, type='skill', notext=true}) .. ' Level')) | ||
table.insert(resultPart, '| | table.insert(resultPart, '\n!rowspan="' .. headerRowSpan .. '"| Cost') | ||
table.insert(resultPart, '! | for i, modDef in ipairs(modifiers) do | ||
modTotal[modDef.name] = 0 | |||
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) | |||
local cellStart = '\n|style="text-align:right"' | |||
if tool.contains ~= nil and tool.contains.modifiers ~= nil then | |||
for j, modDef in ipairs(modifiers) do | |||
local modName = modDef.name | |||
local modVal = tool.contains.modifiers[modName] | |||
if modVal ~= nil 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 | |||
modVal = modVal[1].value | |||
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 | ||
end | |||
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 | |||
function p.getPickaxeTable(frame) | |||
local modifiers = { | |||
{ name = 'decreasedSkillIntervalPercent', header = 'Mining Time Decrease', sign = '-', suffix = '%' }, | |||
{ name = 'increasedChanceToDoubleOres', header = '2x Ore Chance', sign = '+', suffix = '%' }, | |||
{ name = 'increasedChanceForOneExtraOre', header = '+1 Ore Chance', sign = '+', suffix = '%' }, | |||
{ name = 'increasedChanceForQualitySuperiorGem', header = 'Superior Gem Chance', sign = '+', suffix = '%' }, | |||
{ name = 'increasedMeteoriteOre', header = 'Increased ' .. Icons.Icon({'Meteorite Ore', type='item', notext=true}), sign = '+', suffix = '' } | |||
} | |||
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 | ||
return | 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 |