2,875
edits
(Add x to <sub> item count) |
No edit summary |
||
Line 474: | Line 474: | ||
function p.getRunecraftingTable(frame) | function p.getRunecraftingTable(frame) | ||
local category = frame.args ~= nil and frame.args[1] or frame | local category = frame.args ~= nil and frame.args[1] or frame | ||
return p._getRecipeTable('Runecrafting', category, {' | return p._getRecipeTable('Runecrafting', category, {'Item', 'DLC', 'SkillLevel', 'SkillXP', 'Materials', 'Currency'}) | ||
end | end | ||
function p.getFletchingTable(frame) | function p.getFletchingTable(frame) | ||
local category = frame.args ~= nil and frame.args[1] or frame | local category = frame.args ~= nil and frame.args[1] or frame | ||
return p._getRecipeTable('Fletching', category, {' | return p._getRecipeTable('Fletching', category, {'Item', 'DLC', 'SkillLevel', 'SkillXP', 'Materials', 'Currency'}) | ||
end | end | ||
function p.getCraftingTable(frame) | function p.getCraftingTable(frame) | ||
local category = frame.args ~= nil and frame.args[1] or frame | local category = frame.args ~= nil and frame.args[1] or frame | ||
local columns = {' | local columns = {'Item', 'DLC', 'SkillLevel', 'SkillXP', 'Materials', 'Currency'} | ||
if category == 'Rings' or category == 'Necklaces' then | if category == 'Rings' or category == 'Necklaces' then | ||
table.insert(columns, "Description") | table.insert(columns, "Description") | ||
Line 493: | Line 493: | ||
function p.getSmithingTable(frame) | function p.getSmithingTable(frame) | ||
local category = frame.args ~= nil and frame.args[1] or frame | local category = frame.args ~= nil and frame.args[1] or frame | ||
local columns = {' | local columns = {'Item', 'DLC', 'SkillLevel', 'SkillXP', 'Materials', 'Currency'} | ||
if category ~= 'Bars' and category ~= 'Abyssal Bars' then | if category ~= 'Bars' and category ~= 'Abyssal Bars' then | ||
table.insert(columns, 'CurrencyBar') | table.insert(columns, 'CurrencyBar') | ||
Line 547: | Line 547: | ||
-- Validation: Column list | -- Validation: Column list | ||
local columnDef = { | local columnDef = { | ||
[" | ["Item"] = {["header"] = 'Item', ["altRepeat"] = false}, | ||
["SkillLevel"] = {["header"] = Icons._SkillRealmIcon(skillName, categoryRealm) .. '<br>Level', ["altRepeat"] = false}, | ["SkillLevel"] = {["header"] = Icons._SkillRealmIcon(skillName, categoryRealm) .. '<br>Level', ["altRepeat"] = false}, | ||
["DLC"] = {["header"] = '[[DLC]]', ["altRepeat"] = true}, | ["DLC"] = {["header"] = '[[DLC]]', ["altRepeat"] = true}, | ||
Line 571: | Line 570: | ||
return Shared.printError('Invalid column ' .. colID .. ' requested') | return Shared.printError('Invalid column ' .. colID .. ' requested') | ||
else | else | ||
header:tag('th'):wikitext(columnDef[colID].header) | if colID == 'Item' then | ||
header:tag('th'):wikitext('Item') | |||
:attr('colspan', 2) | |||
else | |||
header:tag('th'):wikitext(columnDef[colID].header) | |||
if colID == 'CurrencyBar' then | |||
-- For Smithing, a currency value per bar column is included. If this | |||
-- is requested, then obtain a list of bar item IDs | |||
barIDList = p.getBarItemIDs() | |||
end | |||
end | end | ||
end | end | ||
Line 620: | Line 624: | ||
cell:attr('rowspan', tostring(rowspanAmt)) | cell:attr('rowspan', tostring(rowspanAmt)) | ||
end | end | ||
if colID == ' | if colID == 'Item' then | ||
cell:wikitext(Icons.Icon({item.name, type='item' | cell:wikitext(Icons.Icon({item.name, type='item', notext=true})) | ||
:addClass('table-img') | :addClass('table-img') | ||
cell:wikitext((qty > 1 and '<b>' .. qty .. 'x</b> ' or '') .. Icons.Icon({item.name, type='item', noicon=true})) | cell:wikitext((qty > 1 and '<b>' .. qty .. 'x</b> ' or '') .. Icons.Icon({item.name, type='item', noicon=true})) | ||
if qty > 1 then | if qty > 1 then |
edits