merchant 
Vars | |
| _hub_ref | A weakref to the currently connected trade hub, if any. |
|---|---|
| _merchant_ref | A weakref to the merchant that is currently being interacted with, if any. |
| _pad_ref | A weakref to the merchant pad next to the console, if any. |
| last_comms | Holds a string containing the most recent 'message' sent to the player from the merchant. |
| prompt_message | If not null, the UI window will show the message inside this var, until the player clicks the 'Continue' button. |
| stored_cash | Holds cash used to trade with merchants, in the format of /decl/currency/foo = 5000. |
Procs | |
| adjust_cash | Changes how much of a specific currency the computer contains, removing it entirely if it runs out. |
| ask_appraisal | Asks the merchant to say how much they would pay for everything on the merchant pad, assuming they want it. |
| ask_duration_of_stay | Asks how long the merchant is gonna stick around for. |
| ask_price | Called when the user clicks on the button to ask for an item's price on the UI. |
| ask_what_they_want | Asks the merchant what items they want to buy. |
| attempt_barter | Attempts to trade for a specific item from the merchant, in exchange for all of the items on the pad. |
| attempt_gift | Attempts to give everything on the merchant pad away for free. |
| attempt_purchase | Attempts to purchase a specific item from the merchant, using money. |
| attempt_sell | Attempts to sell everything on the merchant pad, in exchange for money. |
| bribe_merchant | Called when the user clicks one of the bribe buttons in the UI. |
| check_hub | Checks whether the inputted trade hub is valid to trade with. |
| check_items_on_pad | Checks that everything on top of the pad are things the merchant won't object to receiving. |
| check_merchant_disconnection | Returns TRUE if the merchant is fed up and cuts the connection. |
| compliment_merchant | Called when the user clicks the compliment button in the UI. |
| connect_to_hub | Connects to the targeted hub. |
| delete_items_on_pad | Deletes all valid objects on top of the merchant pad. Called when the user successfully sell to or barters with a merchant. |
| deposit_cash | Places cash objects that are on top of the pad into the stored_cash list. |
| get_cash | Returns how much of a specific currency the computer currently contains. |
| haggle_buy | Attempts to buy a specific item from the merchant, at a price defined by the user, using money. |
| haggle_sell | Attempts to sell everything on the merchant pad, at a price defined by the user, in exchange for money. |
| hail_merchant | Attempts to hail the target merchant. |
| handle_no_common_language | Called when the merchant receives a question from the user, when the user doesn't speak any of their languages. |
| insult_merchant | Called when the user clicks the insult button in the UI, or rarely if they don't speak any of the merchant's languages. |
| print_price_modifiers | Returns a string describing all of the price modifiers in the inputted list.
You probably don't want to show [supply|demand]_price_modifiers to players,
since it might be weird to be told that a merchant is charging XX% more because the player had low finance skill. |
| scroll_merchant_selection | Called when the user clicks one of the two arrows in the UI to 'scroll' to different available merchants. |
| withdraw_cash | Removes the cash held inside of stored_cash back onto the pad. |
Var Details
_hub_ref 
A weakref to the currently connected trade hub, if any.
_merchant_ref 
A weakref to the merchant that is currently being interacted with, if any.
_pad_ref 
A weakref to the merchant pad next to the console, if any.
last_comms 
Holds a string containing the most recent 'message' sent to the player from the merchant.
prompt_message 
If not null, the UI window will show the message inside this var, until the player clicks the 'Continue' button.
stored_cash 
Holds cash used to trade with merchants, in the format of /decl/currency/foo = 5000.
Proc Details
adjust_cash
Changes how much of a specific currency the computer contains, removing it entirely if it runs out.
ask_appraisal
Asks the merchant to say how much they would pay for everything on the merchant pad, assuming they want it.
ask_duration_of_stay
Asks how long the merchant is gonna stick around for.
ask_price
Called when the user clicks on the button to ask for an item's price on the UI.
ask_what_they_want
Asks the merchant what items they want to buy.
attempt_barter
Attempts to trade for a specific item from the merchant, in exchange for all of the items on the pad.
attempt_gift
Attempts to give everything on the merchant pad away for free.
attempt_purchase
Attempts to purchase a specific item from the merchant, using money.
attempt_sell
Attempts to sell everything on the merchant pad, in exchange for money.
bribe_merchant
Called when the user clicks one of the bribe buttons in the UI.
check_hub
Checks whether the inputted trade hub is valid to trade with.
check_items_on_pad
Checks that everything on top of the pad are things the merchant won't object to receiving.
check_merchant_disconnection
Returns TRUE if the merchant is fed up and cuts the connection.
compliment_merchant
Called when the user clicks the compliment button in the UI.
connect_to_hub
Connects to the targeted hub.
delete_items_on_pad
Deletes all valid objects on top of the merchant pad. Called when the user successfully sell to or barters with a merchant.
deposit_cash
Places cash objects that are on top of the pad into the stored_cash list.
get_cash
Returns how much of a specific currency the computer currently contains.
haggle_buy
Attempts to buy a specific item from the merchant, at a price defined by the user, using money.
haggle_sell
Attempts to sell everything on the merchant pad, at a price defined by the user, in exchange for money.
hail_merchant
Attempts to hail the target merchant.
handle_no_common_language
Called when the merchant receives a question from the user, when the user doesn't speak any of their languages.
insult_merchant
Called when the user clicks the insult button in the UI, or rarely if they don't speak any of the merchant's languages.
print_price_modifiers
Returns a string describing all of the price modifiers in the inputted list.
You probably don't want to show [supply|demand]_price_modifiers to players,
since it might be weird to be told that a merchant is charging XX% more because the player had low finance skill.
scroll_merchant_selection
Called when the user clicks one of the two arrows in the UI to 'scroll' to different available merchants.
withdraw_cash
Removes the cash held inside of stored_cash back onto the pad.