Module:Weapon comparison table

local p = {} local util = require('Module:Util') local i = require('Module:Icons')

function p.compare local currenttitle = util.corename local legend = mw.html.create('table') legend:addClass('va-table-collapse mw-collapsible mw-collapsed') :cssText('text-align: left; border: none;') :attr('cellspacing', '0') :attr('cellpadding', '2') :tag('tr') :tag('th') :attr('colspan', '5') :css('float', 'left') :tag('b') :wikitext('Legend') :done :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('melee', nil, '', 'Weapon name (current weapon is highlighted)', nil, '18px')) :done :tag('td') :wikitext('- Weapon name (melee or unarmed)') :tag('td') :wikitext(i.moduleIcons('sequence', nil, '', 'Attacks in V.A.T.S.', nil, '18px')) :done :tag('td') :attr('rowspan', '12') :css('padding-left', '4em') :tag('td') :wikitext('- Attacks in V.A.T.S.') :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('gun', nil, '', 'Weapon name (current weapon is highlighted)', nil, '18px')) :done :tag('td') :wikitext('- Weapon name (gun, energy or explosive)') :done :tag('td') :wikitext(i.moduleIcons('ap', nil, '', 'Action point cost', nil, '18px')) :done :tag('td') :wikitext('- Action point cost') :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('damage', nil, '', 'Damage per attack', nil, '18px')) :done :tag('td') :wikitext('- Damage per attack (damage per projectile)') :done :tag('td') :wikitext(i.moduleIcons('dap', nil, '', 'Damage per action point', nil, '18px')) :done :tag('td') :wikitext('- Damage per action point') :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('dps', nil, '', 'Damage per second', nil, '18px')) :done :tag('td') :wikitext('- Damaghe per second') :done :tag('td') :wikitext(i.moduleIcons('spread', nil, '', 'Weapon spread', nil, '18px')) :done :tag('td') :wikitext('- Weapon spread') :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('explosion', nil, '', 'Area of effect damage', nil, '18px')) :done :tag('td') :wikitext('- Area of effect damage') :done :tag('td') :wikitext(i.moduleIcons('mag', nil, '', 'Magazine capacity (shots per reload)', nil, '18px')) :done :tag('td') :wikitext('- Magazine capacity (shots per reload)') :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('effect', nil, '', 'Effect damage and duration', nil, '18px')) :done :tag('td') :wikitext('- Effect damage and duration') :done :tag('td') :wikitext(i.moduleIcons('repair', nil, '', 'Durability (number of attacks before breaking)', nil, '18px')) :done :tag('td') :wikitext('- Durability (number of attacks before breaking)') :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('bonus effect', nil, '', 'Bonus effects', nil, '18px')) :done :tag('td') :wikitext('- Bonus Effects') :done :tag('td') :wikitext(i.moduleIcons('weight', nil, '', 'Weight', nil, '18px')) :done :tag('td') :wikitext('- Weight') :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('attack', nil, '', 'Attacks per second', nil, '18px')) :done :tag('td') :wikitext('- Attacks per second') :done :tag('td') :wikitext(i.moduleIcons('merchant', nil, '', 'Value in caps', nil, '18px')) :done :tag('td') :wikitext('- Value in caps') :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('chance', nil, '', 'Critical chance % multiplier', nil, '18px')) :done :tag('td') :wikitext('- Critical chance % multiplier') :done :tag('td') :wikitext(i.moduleIcons('ratio', nil, '', 'Value to weight ratio', nil, '18px')) :done :tag('td') :wikitext('- Value to weight ratio') :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('crit', nil, '', 'Critical damage', nil, '18px')) :done :tag('td') :wikitext('- Critical damage') :done :tag('td') :wikitext(i.moduleIcons('ability', nil, '', 'Skill required', nil, '18px')) :done :tag('td') :wikitext('- Skill required') :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('crit effect', nil, '', 'Critical effect damage & duration', nil, '18px')) :done :tag('td') :wikitext('- Critical effect damage & duration') :done :tag('td') :wikitext(i.moduleIcons('fist', nil, '', 'Strength required', nil, '18px')) :done :tag('td') :wikitext('- Strength required') :done :done :tag('tr') :tag('td') :wikitext(i.moduleIcons('mod', nil, '', 'With all mods attached', nil, '18px')) :done :tag('td') :wikitext('- With all mods attached') :done :tag('td') :done :tag('td') :done :done :done return legend end

return p