market_item
![code/modules/cargo/markets/market_item.dm 1](git.png)
Vars | |
abstract_path | Used to exclude abstract/special paths from the unit test if the value matches the type itself. |
---|---|
availability_prob | Probability for this item to be available. Used by SSblackmarket on init. |
category | The category this item belongs to, should be already declared in the market that this item is accessible in. |
desc | Description for the item entry used in the uplink. |
identifier | The identifier for the market item, generated on runtime and used to access them in the market categories. |
item | Path to or the item itself what this entry is for, this should be set even if you override spawn_item to spawn your item. |
markets | "/datum/market"s that this item should be in, used by SSblackmarket on init. |
name | Name for the item entry used in the uplink. |
price | Price for the item, if not set creates a price according to the *_min and *_max vars. |
price_max | Maximum price for the item if generated randomly. |
price_min | Minimum price for the item if generated randomly. |
shipping_override | If set, these will override the shipment methods set by the market |
stock | How many of this type of item is available, if not set creates a price according to the *_min and *_max vars. |
stock_max | Maximum amount that there should be of this item in the market if generated randomly. |
stock_min | Minimum amount that there should be of this item in the market if generated randomly. This defaults to 1 as most items will have it as 1. |
Procs | |
buy | Buys the item and makes SSblackmarket handle it. |
set_item | For 'dynamic' market items generated on runtime, this proc is to be used to properly sets the item, especially if it's a hardref. |
spawn_item | Used for spawning the wanted item, override if you need to do something special with the item. |
Var Details
abstract_path
![code/modules/cargo/markets/market_item.dm 20](git.png)
Used to exclude abstract/special paths from the unit test if the value matches the type itself.
availability_prob
![code/modules/cargo/markets/market_item.dm 31](git.png)
Probability for this item to be available. Used by SSblackmarket on init.
category
![code/modules/cargo/markets/market_item.dm 7](git.png)
The category this item belongs to, should be already declared in the market that this item is accessible in.
desc
![code/modules/cargo/markets/market_item.dm 5](git.png)
Description for the item entry used in the uplink.
identifier
![code/modules/cargo/markets/market_item.dm 34](git.png)
The identifier for the market item, generated on runtime and used to access them in the market categories.
item
![code/modules/cargo/markets/market_item.dm 17](git.png)
Path to or the item itself what this entry is for, this should be set even if you override spawn_item to spawn your item.
markets
![code/modules/cargo/markets/market_item.dm 9](git.png)
"/datum/market"s that this item should be in, used by SSblackmarket on init.
name
![code/modules/cargo/markets/market_item.dm 3](git.png)
Name for the item entry used in the uplink.
price
![code/modules/cargo/markets/market_item.dm 12](git.png)
Price for the item, if not set creates a price according to the *_min and *_max vars.
price_max
![code/modules/cargo/markets/market_item.dm 25](git.png)
Maximum price for the item if generated randomly.
price_min
![code/modules/cargo/markets/market_item.dm 23](git.png)
Minimum price for the item if generated randomly.
shipping_override
![code/modules/cargo/markets/market_item.dm 39](git.png)
If set, these will override the shipment methods set by the market
stock
![code/modules/cargo/markets/market_item.dm 14](git.png)
How many of this type of item is available, if not set creates a price according to the *_min and *_max vars.
stock_max
![code/modules/cargo/markets/market_item.dm 29](git.png)
Maximum amount that there should be of this item in the market if generated randomly.
stock_min
![code/modules/cargo/markets/market_item.dm 27](git.png)
Minimum amount that there should be of this item in the market if generated randomly. This defaults to 1 as most items will have it as 1.
Proc Details
buy
Buys the item and makes SSblackmarket handle it.
@param uplink The uplink that is buying the item. @param buyer The mob that is buying the item. @param shipping_method The shipping method used to get the market item onto the station. @param legal_status The legal status of the market. Determines if the item to be spawned is contraband.
set_item
For 'dynamic' market items generated on runtime, this proc is to be used to properly sets the item, especially if it's a hardref.
spawn_item
Used for spawning the wanted item, override if you need to do something special with the item.