Space Station 13 - Nebula13 - Modules - Types — Var Details - Proc Details

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_positionDetermines where this adds onto the demand's name. Negative numbers act as prefixes, while positive ones act as suffixes.

Procs

build_parametersUsed to convert hand-authored parameters into something potentially better suited or more optimized for future checks. Called once on /datum/merchant_commodity init.
compare_instanceActs 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_typeActs 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_nameGenerates 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.

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.