4,978
edits
(Change Category to Source; Source text is now the skill; Add Cartography and Astrology creation data; Add item chance where applicable (L-179); Show multiple quantity data for a select few items (L-211); Add Cooking Upgrades to Cooking Recipe Requirements; Use proper colspan on "Global" data when there was >= 3 table headers; Change XP to only show skill icon when in the table;) |
(Add missing Firemaking and Cartography input data) |
||
Line 23: | Line 23: | ||
-- Fix TODOs throughout file then remove this test function | -- Fix TODOs throughout file then remove this test function | ||
-- (Major) Either add all the data from _getItemSourceTables into a single table or convert those over to a similar style table as well | -- (Major) Either add all the data from _getItemSourceTables into a single table or convert those over to a similar style table as well | ||
local tables = {} | local tables = {} | ||
local checkItems = { | local checkItems = { | ||
Line 124: | Line 123: | ||
local skillIDs = { | local skillIDs = { | ||
['Gathering'] = { | ['Gathering'] = { | ||
['Farming'] = { recipeKey = 'recipes | ['Farming'] = { recipeKey = 'recipes' }, | ||
['Woodcutting'] = { recipeKey = 'trees | ['Woodcutting'] = { recipeKey = 'trees' }, | ||
['Fishing'] = { recipeKey = 'fish | ['Fishing'] = { recipeKey = 'fish' }, | ||
['Firemaking'] = { recipeKey = 'logs | ['Firemaking'] = { recipeKey = 'logs' }, | ||
['Mining'] = { recipeKey = 'rockData | ['Mining'] = { recipeKey = 'rockData' }, | ||
['Cartography'] = { recipeKey = 'paperRecipes' }, | ['Cartography'] = { recipeKey = 'paperRecipes' }, | ||
['Harvesting'] = { recipeKey = 'veinData | ['Harvesting'] = { recipeKey = 'veinData' } | ||
}, | }, | ||
['Artisan'] = { | ['Artisan'] = { | ||
Line 156: | Line 155: | ||
qty = recipe.baseQuantity or 1 | qty = recipe.baseQuantity or 1 | ||
source = Icons.Icon({ skill, type='skill', class=(isAbyssal and 'abyss-icon' or '') }) | source = Icons.Icon({ skill, type='skill', class=(isAbyssal and 'abyss-icon' or '') }) | ||
if localSkillID == 'Farming' then | if localSkillID == 'Farming' then | ||
costs = { recipe.seedCost } | costs = { recipe.seedCost } | ||
Line 177: | Line 173: | ||
time = 5 | time = 5 | ||
end | end | ||
-- Item chance data | |||
if itemID == 'melvorF:Ash' then | if itemID == 'melvorF:Ash' then | ||
qty = time | qty = time | ||
Line 187: | Line 184: | ||
elseif itemID == 'melvorF:Stardust' then | elseif itemID == 'melvorF:Stardust' then | ||
chance = '100%' | chance = '100%' | ||
elseif localSkillID == 'Firemaking' and | elseif itemID == 'melvorD:Coal_Ore' then | ||
chance = (localSkillID == 'Firemaking' and '40%' or '100%') | |||
end | |||
-- Item cost data | |||
if localSkillID == 'Firemaking' then | |||
local costItem = Items.getItemByID(recipe.logID) | |||
costs = Icons.Icon({costItem.name, type='item', qty=1}) | |||
elseif localSkillID == 'Cartography' then | |||
local costItem = Items.getItemByID(recipe.costs.items[1].id) | |||
costs = Icons.Icon({costItem.name, type='item', qty=1}) | |||
end | end | ||
-- Special requirements | -- Special requirements | ||
Line 556: | Line 561: | ||
local reqRow = resultTable:tag('tr') | local reqRow = resultTable:tag('tr') | ||
:tag('th') | :tag('th') | ||
:wikitext(' | :wikitext('Requires') | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
local reqData = reqRow:tag('td'):attr('colspan', (colspan >= 2 and colspan or 1)) | local reqData = reqRow:tag('td'):attr('colspan', (colspan >= 2 and colspan or 1)) | ||
Line 583: | Line 588: | ||
resultTable:tag('tr') | resultTable:tag('tr') | ||
:tag('th') | :tag('th') | ||
:wikitext('Base | :wikitext('Base Exp') | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
:tag('td'):attr('colspan', (colspan >= 2 and colspan or 1)):wikitext(Num.formatnum(tableData[1].xp) .. (tableData[1].isAbyssal and ' AXP' or ' XP')) | :tag('td'):attr('colspan', (colspan >= 2 and colspan or 1)):wikitext(Num.formatnum(tableData[1].xp) .. (tableData[1].isAbyssal and ' AXP' or ' XP')) |