merchant_commodity_requirement 
Used to impose criteria that the merchant can use to compare against to determine if they want to accept a possible transaction involving a specific commodity instance. This is generally only used for items attempting to be sold to merchants. The most basic form of this is generally 'is this the correct type?', but other requirements can also be used to add more complexity.
Vars | |
| naming_position | Determines where this adds onto the demand's name. Negative numbers act as prefixes, while positive ones act as suffixes. |
|---|---|
Procs | |
| build_parameters | Used to convert hand-authored parameters into something potentially better suited or more optimized for future checks.
Called once on /datum/merchant_commodity init. |
| compare_instance | Acts as a condition that will determine whether or not a particular atom/movable/instance should pass.
This is usually called when a player is trying to sell an instance to a merchant. |
| compare_type | Acts as a condition that will determine whether or not a particular type_path should pass. This is generally only needed for type-specific requirements.
This is usually called when a player is trying to buy a type from a merchant, or if a merchant needs to check if they buy and sell the same thing. |
| generate_name | Generates part of the name for a commodity object. Generally takes the form of a prefix or suffix, depending on naming_position.
Called once on /datum/merchant_commodity init. |
Var Details
naming_position 
Determines where this adds onto the demand's name. Negative numbers act as prefixes, while positive ones act as suffixes.
Proc Details
build_parameters
Used to convert hand-authored parameters into something potentially better suited or more optimized for future checks.
Called once on /datum/merchant_commodity init.
compare_instance
Acts as a condition that will determine whether or not a particular atom/movable/instance should pass.
This is usually called when a player is trying to sell an instance to a merchant.
list/parameters: Information which was supplied, and is used to make the comparison. Subtypes expect a specific format for their parameters. May or may not actually be a list, depending on subtype.atom/movable/instance: An instance to compare against.
compare_type
Acts as a condition that will determine whether or not a particular type_path should pass. This is generally only needed for type-specific requirements.
This is usually called when a player is trying to buy a type from a merchant, or if a merchant needs to check if they buy and sell the same thing.
list/parameters: Information which was supplied, and is used to make the comparison. Subtypes expect a specific format for their parameters. May or may not actually be a list, depending on subtype.type_path: A path to compare against.
generate_name
Generates part of the name for a commodity object. Generally takes the form of a prefix or suffix, depending on naming_position.
Called once on /datum/merchant_commodity init.
list/parameters: Information supplied for future comparisons. Subtypes expect a specific format for their parameters. May or may not actually be a list, depending on subtype.list/all_requirements: List containing all of the/decl/merchant_commodity_requirements that a particular demand has, including this one. Used to enable soft dependencies.