Module:Sandbox/User:Artoire/1: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
mNo edit summary
mNo edit summary
Line 210: Line 210:
local colspan = 23
local colspan = 23
if chopping_logs then
if chopping_logs then
colspan = colspan + 4
colspan = colspan + 1
end
end
if chopping_logs or buying_logs then
if chopping_logs or buying_logs then
colspan = colspan + 1
colspan = colspan + 3
end
end


Line 223: Line 223:
:IF(chopping_logs)
:IF(chopping_logs)
:th(skillclickpic('Woodcutter')):done()
:th(skillclickpic('Woodcutter')):done()
:th{ 'Log', attr = { colspan = '3' } }:done()
:END()
:END()
:IF(chopping_logs or buying_logs)
:IF(chopping_logs or buying_logs)
:th{ 'Log', attr = { colspan = '3' } }:done()
:th(skillclickpic('Carpenter')):done()
:th(skillclickpic('Carpenter')):done()
:END()
:END()
Line 272: Line 272:
if weapon.pole then
if weapon.pole then
needed_poles = needed * weapon.pole.quantity
needed_poles = needed * weapon.pole.quantity
if chopping_logs then
if chopping_logs or buying_logs then
pole_info = lookup_pole(weapon.pole.name)
pole_info = lookup_pole(weapon.pole.name)
needed_logs = math.ceil(needed_poles / 2)
needed_logs = math.ceil(needed_poles / 2)
end
if chopping_logs then
row
row
:td(lookup_log(pole_info.log).level):done()
:td(lookup_log(pole_info.log).level):done()
:td{ needed_logs .. '×', css = { ['border-right'] = '0', ['padding-right'] = '0', ['text-align'] = 'right' }, attr = { ['data-sort-value'] = needed_logs } }:done()
:td{ ('[[File:%s.png|link=%s|30px]]'):format(pole_info.log, pole_info.log), css = { ['border-left'] = '0', ['padding-left'] = '0' }, addClass = 'plinkt-image no-border' }:done()
:td{ '[[' .. pole_info.log .. ']]', addClass = 'plinkt-link no-border' }:done()
end
end
if chopping_logs or buying_logs then
if chopping_logs or buying_logs then
pole_info = pole_info or lookup_pole(weapon.pole.name)
row
row
:td{ needed_logs .. '×', css = { ['border-right'] = '0', ['padding-right'] = '0', ['text-align'] = 'right' }, attr = { ['data-sort-value'] = needed_logs } }:done()
:td{ ('[[File:%s.png|link=%s|30px]]'):format(pole_info.log, pole_info.log), css = { ['border-left'] = '0', ['padding-left'] = '0' }, addClass = 'plinkt-image no-border' }:done()
:td{ '[[' .. pole_info.log .. ']]', addClass = 'plinkt-link no-border' }:done()
:td(pole_info.level):done()
:td(pole_info.level):done()
end
end
Line 295: Line 296:
row
row
:na()
:na()
:td{ '<small>N/A</small>', addClass = 'table-na', attr = { ['data-sort-value'] = '0', colspan = '3' } }:done()
end
end
if chopping_logs or buying_logs then
if chopping_logs or buying_logs then
row
row
:td{ '<small>N/A</small>', addClass = 'table-na', attr = { ['data-sort-value'] = '0', colspan = '3' } }:done()
:na()
:na()
end
end