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 140: | Line 140: | ||
local function _lookup_log_uncached(log) |
local function _lookup_log_uncached(log) |
||
local data = mw.smw.ask{ |
local data = mw.smw.ask{ |
||
('[[%s]]'):format( |
('[[%s]]'):format(log), |
||
['?Profession Level A'] = '', |
['?Profession Level A'] = '', |
||
mainlabel = '-' |
mainlabel = '-' |
||
Line 239: | Line 239: | ||
:tr() |
:tr() |
||
:td{ |
:td{ |
||
'Missing XP for smelting [[' .. ingot.ingot .. ']]; Please [' .. mw.uri.fullUrl(ingot.ingot, 'action=edit§ion=1') .. ' edit the page] to add the experience earned (after |exp =)', |
'Missing XP for smelting [[' .. ingot.ingot .. ']]; Please [' .. tostring(mw.uri.fullUrl(ingot.ingot, 'action=edit§ion=1')) .. ' edit the page] to add the experience earned (after |exp =)', |
||
attr = { colspan = colspan } |
attr = { colspan = colspan } |
||
} |
} |
||
Line 249: | Line 249: | ||
:tr() |
:tr() |
||
:td{ |
:td{ |
||
'Missing XP for creating [[' .. weapon.name .. ']]; Please ['.. mw.uri.fullUrl(weapon.name, 'action=edit§ion=1') .. ' edit the page] to add the experience earned (after |exp =)', |
'Missing XP for creating [[' .. weapon.name .. ']]; Please ['.. tostring(mw.uri.fullUrl(weapon.name, 'action=edit§ion=1')) .. ' edit the page] to add the experience earned (after |exp =)', |
||
attr = { colspan = colspan } |
attr = { colspan = colspan } |
||
} |
} |
||
:done() |
:done() |
||
else |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
local needed_ores = needed * weapon.ingot.quantity |
local needed_ores = needed * weapon.ingot.quantity |
||
local row = tbl |
local row = tbl |
||
:tag('tr') |
:tag('tr') |
||
:td(lookup_ore(ingot.ore).level):done() |
: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{ 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{ ('[[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{ '[[' .. 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{ ('[[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() |
:td{ '[[' .. ingot.ingot .. ']]', addClass = 'plinkt-link no-border' }:done() |
||
local pole_info |
local pole_info |
||
local needed_logs, needed_poles |
local needed_logs, needed_poles |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
if weapon.pole then |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
row |
row |
||
⚫ | |||
⚫ | |||
:td{ |
: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{ |
:td{ '[[' .. weapon.pole.name .. ']]', addClass = 'plinkt-link no-border' }:done() |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
row |
row |
||
⚫ | |||
⚫ | |||
end |
end |
||
row |
row |
||
⚫ | |||
⚫ | |||
:td{ |
:td{ needed .. '×', css = { ['border-right'] = '0', ['padding-right'] = '0', ['text-align'] = 'right' }, attr = { ['data-sort-value'] = needed } }:done() |
||
: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() |
||
⚫ | |||
⚫ | |||
⚫ | |||
if chopping_logs then |
if chopping_logs then |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
end |
end |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
end |
end |
||
⚫ | |||
end |
end |
||