17,030
edits
(Remove separation of one-handed & two-handed weapons) |
(Add two-handed indicator column for weapon tables) |
||
Line 324: | Line 324: | ||
local isWeapon = (slot == 'Weapon') | local isWeapon = (slot == 'Weapon') | ||
local itemColspan = 3 | local itemColspan = (isWeapon and 5) or 3 | ||
local html = mw.html.create('table') | local html = mw.html.create('table') | ||
Line 348: | Line 347: | ||
header1:tag('th'):wikitext('DLC') | header1:tag('th'):wikitext('DLC') | ||
if isWeapon == true then | if isWeapon == true then | ||
header1:tag('th'):wikitext('Two<br>Handed') | |||
header1:tag('th'):wikitext('Attack<br>Speed') | header1:tag('th'):wikitext('Attack<br>Speed') | ||
end | end | ||
Line 384: | Line 384: | ||
:attr('data-sort-value', Icons.getExpansionID(item.id)) | :attr('data-sort-value', Icons.getExpansionID(item.id)) | ||
-- Add attack speed. | -- Add two-handed & attack speed. | ||
if isWeapon == true then | if isWeapon == true then | ||
local twoHandText = (Items._getItemStat(item, 'isTwoHanded') and 'Yes') or 'No' | |||
row:tag('td'):wikitext(twoHandText) | |||
:css('text-align', 'center') | |||
local atkSpeed = Items._getItemStat(item, 'attackSpeed') or 0 | local atkSpeed = Items._getItemStat(item, 'attackSpeed') or 0 | ||
if atkSpeed > 0 then | if atkSpeed > 0 then | ||
Line 580: | Line 584: | ||
local PR = item.providedRunes | local PR = item.providedRunes | ||
table.insert(resultPart, '\r\n|-') | table.insert(resultPart, '\r\n|-') | ||
table.insert(resultPart, '\r\n|style="text-align: | table.insert(resultPart, '\r\n|style="text-align: center;"|'..Icons.Icon({item.name, type='item', size=50, notext=true})) | ||
table.insert(resultPart, '\r\n|' .. Icons.getExpansionIcon(item.id) .. Icons.Icon({item.name, type='item', noicon=true})) | table.insert(resultPart, '\r\n|' .. Icons.getExpansionIcon(item.id) .. Icons.Icon({item.name, type='item', noicon=true})) | ||
local runeLines = {} | local runeLines = {} |