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

m
Test
mNo edit summary
m (Test)
Line 318:
:td{ '[[' .. weapon.name .. ']]', addClass = 'plinkt-link no-border' }
 
local j = { needed_ores = needed_ores, lookup_ore = lookup_price(ingot.ore) }
local cost = needed_ores * lookup_price(ingot.ore)[buying_ores and 'buy' or 'sell']
if chopping_logs then
if needed_logs then
j.needed_logs = needed_logs
j.lookup_log = lookup_price(pole_info.log)
cost = cost + needed_logs * lookup_price(pole_info.log).sell
end
elseif buying_logs then
if needed_logs then
j.needed_logs = needed_logs
j.lookup_log = lookup_price(pole_info.log)
cost = cost + needed_logs * lookup_price(pole_info.log).buy
end
else
if weapon.pole then
j.needed_logs = needed_poles
j.lookup_log = lookup_price(weapon.pole.name)
cost = cost + needed_poles * lookup_price(weapon.pole.name).buy
end
end
 
if args.debug then
row:node(currency._cell(cost, { html = 'yes' }))
row
:td{ mw.text.jsonEncode(j), attr = { colspan = "10" } }
else
row:node(currency._cell(cost, { html = 'yes' }))
end
end
end
697

edits