Editing Module:Sandbox/User:Artoire/1

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 342: Line 342:
:td{ '[[' .. weapon.name .. ']]', addClass = 'plinkt-link no-border' }
: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']
local cost = needed_ores * lookup_price(ingot.ore)[buying_ores and 'buy' or 'sell']
if chopping_logs then
if chopping_logs then
if needed_logs then
if needed_logs then
j.needed_logs = needed_logs
j.lookup_chop_log = lookup_price(pole_info.log)
cost = cost + needed_logs * lookup_price(pole_info.log).sell
cost = cost + needed_logs * lookup_price(pole_info.log).sell
end
end
elseif buying_logs then
elseif buying_logs then
if needed_logs then
if needed_logs then
j.needed_logs = needed_logs
j.lookup_buy_log = lookup_price(pole_info.log)
cost = cost + needed_logs * lookup_price(pole_info.log).buy
cost = cost + needed_logs * lookup_price(pole_info.log).buy
end
end
else
else
if weapon.pole then
if weapon.pole then
j.needed_poles = needed_poles
j.lookup_buy_poles = lookup_price(weapon.pole.name)
cost = cost + needed_poles * lookup_price(weapon.pole.name).buy
cost = cost + needed_poles * lookup_price(weapon.pole.name).buy
end
end
end
end


if args.debug then
row:node(currency._cell(cost, { html = 'yes' }))
j.cost = cost
row
:td{ mw.text.jsonEncode(j), attr = { colspan = "10" } }
else
row:node(currency._cell(cost, { html = 'yes' }))
end
end
end
end
end
Please note that all contributions to Brighter Shores Wiki are considered to be released under the CC BY-NC-SA 3.0 (see Brighter Shores:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template

Template used on this page: