Module:ProfessionList: Difference between revisions
m
fix edge cases with sell price arithmetic
m (incorporate quantity of product item in the returned sellPrice variable) |
m (fix edge cases with sell price arithmetic) |
||
Line 154:
-- include the price of selling the product
local qty = item.output[1].quantity
item.sellPrice = sell and qty and sell * qty
item.profit = item.buyPrice and item.sellPrice and item.sellPrice - item.buyPrice
item.profitPerXP = item.profit and item.xp and item.profit / item.xp
|