Module:Sandbox/User:Artoire/1: Difference between revisions
m
no edit summary
mNo edit summary |
mNo edit summary |
||
Line 199:
local result = mw.html.create()
result:wikitext(('To get from %s xp (level %s) to %s xp (level %s) requires %s experience'):format(lang:formatNum(current_xp), current_lvl, lang:formatNum(target_xp), target_lvl, lang:formatNum(remaining_xp)))
local tbl = result:tag('table')
Line 208:
end
local colspan =
if chopping_logs then
colspan = colspan + 4
Line 217:
tbl
:
:th(skillclickpic('Miner')):done()
:th{ 'Ore', attr = { colspan = '3' } }:done()
:th
:IF(chopping_logs)
:th(skillclickpic('Woodcutter')):done()
:th{ 'Log', attr = { colspan = '3' } }:done()
:
:IF(chopping_logs or buying_logs)
:th(skillclickpic('Carpenter')):done()
:
:th{ 'Pole', attr = { colspan = '3' } }:done()
:th(skillclickpic('Blacksmith')):done()
:th{ 'Product', attr = { colspan = '3' } }:done()
:th{ 'Cost', attr = { colspan = '10' } }:done()
:done()
for _, weapon in ipairs(lookup_weapons()[ingot.
if not ingot.xp then
tbl
:tr()
:td{
'Missing XP for smelting [[' .. ingot.
attr = { colspan = colspan }
}
Line 260:
local needed_ores = needed * weapon.ingot.quantity
local row = tbl
:
:td(lookup_ore(ingot.ore).level):done()
:td{ needed_ores .. '×', css = { ['border-right'] = '0', ['padding-right'] = '0', ['text-align'] = 'right', ['data-sort-value'] = needed_ores } }:done()
:td{ ('[[File:%s.png|link=%s|30px]]'):format(ingot.ore, ingot.ore), css = { ['border-left'] = '0', ['padding-left'] = '0' }, addClass = 'plinkt-image no-border' }:done()
:td{ '[[' .. ingot.ore .. ']]', addClass = 'plinkt-link no-border' }:done()
:td{ ('[[File:%s.png|link=%s|30px]]'):format(ingot.ingot, ingot.ingot), css = { ['border-left'] = '0', ['padding-left'] = '0' }, addClass = 'plinkt-image no-border', ['data-sort-value'] = needed_ores }:done()
:td{ '[[' .. ingot.ingot .. ']]', addClass = 'plinkt-link no-border' }:done()
local pole_info
Line 275 ⟶ 277:
needed_logs = math.ceil(needed_poles / 2)
row
: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.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
if chopping_logs or buying_logs then
pole_info = pole_info or lookup_pole(weapon.pole.name)
row
:td(pole_info.level):done()
end
row
:td{ needed_poles .. '×', css = { ['border-right'] = '0', ['padding-right'] = '0', ['text-align'] = 'right' }, attr = { ['data-sort-value'] = needed_poles } }:done()
:td{ ('[[File:%s.png|link=%s|30px]]'):format(weapon.pole.name, weapon.pole.name), css = { ['border-left'] = '0', ['padding-left'] = '0' }, addClass = 'plinkt-image no-border' }:done()
:td{ '[[' .. weapon.pole.name .. ']]', addClass = 'plinkt-link no-border' }:done()
else
if chopping_logs then
row
:na()
:td{ '<small>N/A</small>', addClass = 'table-na', attr = { ['data-sort-value'] = '0', colspan = '3' } }:done()
end
if chopping_logs or buying_logs then
Line 301 ⟶ 303:
end
row
:td{ '<small>N/A</small>', addClass = 'table-na', attr = { ['data-sort-value'] = '0', colspan = '3' } }:done()
end
row
:td(weapon.level)
:td{
:td{ ('[[File:%s.png|link=%s|30px]]'):format(weapon.name, weapon.name), css = { ['border-left'] = '0', ['padding-left'] = '0' }, addClass = 'plinkt-image no-border' }:done()
:td{ '[[' .. weapon.name .. ']]', addClass = 'plinkt-link no-border' }
Line 322 ⟶ 325:
end
row:node(currency._cell(
end
|