merchant_price_modifier 
Procs | |
| calculate | Called when the merchant is calculating the price for something being bought or sold, depending on which list the decl was placed inside of. |
|---|---|
Proc Details
calculate
Called when the merchant is calculating the price for something being bought or sold, depending on which list the decl was placed inside of.
Subtypes should perform some sort of calculation, and then return the answer, which will either become the final price for something,
or be used as the next value for another price modifier further down the list.
value: The price of whatever item the merchant is evaluating. This is not necessarily the base price, as precedingmerchant_price_modifiers will probably have already altered it.input: A value which exists as the value in the key-value pair alongside the decl's typepath in the merchant's price modifier lists. This is typically just a number, but a list could be used for multiple values.mob/user: Reference to the user who is buying from, or selling to, the merchant.datum/merchant/merchant: Reference to the merchant that's currently being interacted with byuser.- Return: The new value, generally derived from the inputted
value.