export ![code/modules/cargo/exports.dm 98](git.png)
Vars | |
allow_negative_cost | whether this export can have a negative impact on the cargo budget or not |
---|---|
amount_report_multiplier | The multiplier of the amount sold shown on the report. Useful for exports, such as material, which costs are not strictly per single units sold. |
cost | Cost of item, in cargo credits. Must not allow for infinite price dupes, see above. |
exclude_types | Types excluded from export |
export_types | Type of the exported object. If none, the export datum is considered base type. |
include_subtypes | Set to FALSE to make the datum apply only to a strict type. |
init_cost | cost includes elasticity, this does not. |
k_elasticity | coefficient used in marginal price calculation that roughly corresponds to the inverse of price elasticity, or "quantity elasticity" |
message | Message appended to the sale report |
scannable | Set to false if the cost shouldn't be determinable by an export scanner |
unit_name | Unit name. Only used in "Received [total_amount] [name]s [message]." |
Procs | |
applies_to | Checks if the item is fit for export datum. |
get_cost | Checks the cost. 0 cost items are skipped in export. |
sell_object | Calculates the exact export value of the object, while factoring in all the relivant variables. |
Var Details
allow_negative_cost ![code/modules/cargo/exports.dm 106](git.png)
whether this export can have a negative impact on the cargo budget or not
amount_report_multiplier ![code/modules/cargo/exports.dm 110](git.png)
The multiplier of the amount sold shown on the report. Useful for exports, such as material, which costs are not strictly per single units sold.
cost ![code/modules/cargo/exports.dm 104](git.png)
Cost of item, in cargo credits. Must not allow for infinite price dupes, see above.
exclude_types ![code/modules/cargo/exports.dm 116](git.png)
Types excluded from export
export_types ![code/modules/cargo/exports.dm 112](git.png)
Type of the exported object. If none, the export datum is considered base type.
include_subtypes ![code/modules/cargo/exports.dm 114](git.png)
Set to FALSE to make the datum apply only to a strict type.
init_cost ![code/modules/cargo/exports.dm 125](git.png)
cost includes elasticity, this does not.
k_elasticity ![code/modules/cargo/exports.dm 108](git.png)
coefficient used in marginal price calculation that roughly corresponds to the inverse of price elasticity, or "quantity elasticity"
message ![code/modules/cargo/exports.dm 102](git.png)
Message appended to the sale report
scannable ![code/modules/cargo/exports.dm 118](git.png)
Set to false if the cost shouldn't be determinable by an export scanner
unit_name ![code/modules/cargo/exports.dm 100](git.png)
Unit name. Only used in "Received [total_amount] [name]s [message]."
Proc Details
applies_to
Checks if the item is fit for export datum.
get_cost
Checks the cost. 0 cost items are skipped in export.
sell_object
Calculates the exact export value of the object, while factoring in all the relivant variables.
Called only once, when the object is actually sold by the datum. Adds item's cost and amount to the current export cycle. get_cost, get_amount and applies_to do not neccesary mean a successful sale.