Module:LeatherworkerList: Difference between revisions

m
cleanup required modules, this one does actually use recipe tree search
(offload much of the search, screen, and format functions to the new ProfessionList module, so they work the same for all table)
m (cleanup required modules, this one does actually use recipe tree search)
Line 3:
local lang = mw.getContentLanguage()
local plist = require('Module:ProfessionList')
local rtssearch = require('Module:RecipeTreeSearch')
local discount = require('Module:MerchantHideDiscount')
 
Line 77:
item.profitPerHour = item.profit and item.productPerHour and math.floor(item.profit * item.productPerHour)
item.profitPerHourDiscount = item.profit and item.productPerHour and math.floor(item.profit * item.productPerHour)
 
-- discounted buy price is not provided by the search, have to do it manually
item.discountLevel = discount[item.material]
item.buyPriceDiscount = rtssearch.getShopSellPrice(item.material)
item.profitDiscount = item.sellPrice and item.buyPriceDiscount and item.sellPrice - item.buyPriceDiscount
item.profitPerHourDiscount = item.profitDiscount and item.productPerHour and math.floor(item.profitDiscount * item.productPerHour)
20,993

edits