/datum/component/material_container
Vars | |
cost_modifier | Modifier for all materials drawn when there's a linked account. |
---|---|
linked_account | The bank account that will recieve funds at certain times when mats are used/withdrawn. |
refund_minimum | The minimum required amount of credits in a bank account to consider giving refunds for inserting materials. Currently the same as cargo gets roundstart. |
Procs | |
Initialize | Sets up the proper signals and fills the list of materials with the appropriate references. |
OnAttackBy | Proc that allows players to fill the parent with mats |
amount2sheet | Turns a material amount into the amount of sheets it should output |
can_insert_amount_mat | Proc for checking if there is room in the component, returning the amount or else the amount lacking. |
get_categories | Returns all the categories in a recipe. |
get_item_material_amount | returns the amount of material relevant to this container; if this container does not support glass, any glass in 'I' will not be taken into account |
get_material_amount | Returns the amount of a specific material in this container. |
get_material_cost | |
get_material_list_cost | |
has_enough_of_category | Returns TRUE if you have enough of a specified material category (Which could be multiple materials) |
has_enough_of_material | Returns TRUE if you have enough of the specified material. |
has_materials | Checks if its possible to afford a certain amount of materials. Takes a dictionary of materials. |
has_space | Proc that returns TRUE if the container has space |
insert_amount_mat | For inserting an amount of material |
insert_item | Proc specifically for inserting items, returns the amount of materials entered. |
retrieve_all | Proc to get all the materials and dump them as sheets |
retrieve_sheets | For spawning mineral sheets at a specific location. Used by machines to output sheets. |
sheet2amount | Turns an amount of sheets into the amount of material amount it should output |
transer_amt_to | Proc for transfering materials to another container. |
use_amount_mat | Uses an amount of a specific material, effectively removing it. |
use_materials | For consuming a dictionary of materials. mats is the map of materials to use and the corresponding amounts, example: list(M/datum/material/glass =100, datum/material/iron=200) |
user_insert | Proc used for when player inserts materials |
Var Details
cost_modifier
Modifier for all materials drawn when there's a linked account.
linked_account
The bank account that will recieve funds at certain times when mats are used/withdrawn.
refund_minimum
The minimum required amount of credits in a bank account to consider giving refunds for inserting materials. Currently the same as cargo gets roundstart.
Proc Details
Initialize
Sets up the proper signals and fills the list of materials with the appropriate references.
OnAttackBy
Proc that allows players to fill the parent with mats
amount2sheet
Turns a material amount into the amount of sheets it should output
can_insert_amount_mat
Proc for checking if there is room in the component, returning the amount or else the amount lacking.
get_categories
Returns all the categories in a recipe.
get_item_material_amount
returns the amount of material relevant to this container; if this container does not support glass, any glass in 'I' will not be taken into account
get_material_amount
Returns the amount of a specific material in this container.
get_material_cost
-
Returns the cost of a certain amount of one material
-
- mat - The material to find the value of.
-
- amt - The amout of material in question.
-
- round - Whether or not to round the cost. MORE IMPORTANT THAN IT SEEMS, IT COULD MEAN THE DIFFERENCE BETWEEN 2000cr AND 25cr!!
-
get_material_list_cost
-
For getting the price of a dictionary of materials.
-
- mats - A map of materials to use and the corresponding amounts, example: list(M/datum/material/glass =100, datum/material/iron=200)
-
- multiplier - How many mats lists should be added
-
has_enough_of_category
Returns TRUE if you have enough of a specified material category (Which could be multiple materials)
has_enough_of_material
Returns TRUE if you have enough of the specified material.
has_materials
Checks if its possible to afford a certain amount of materials. Takes a dictionary of materials.
has_space
Proc that returns TRUE if the container has space
insert_amount_mat
For inserting an amount of material
insert_item
Proc specifically for inserting items, returns the amount of materials entered.
retrieve_all
Proc to get all the materials and dump them as sheets
retrieve_sheets
For spawning mineral sheets at a specific location. Used by machines to output sheets.
sheet2amount
Turns an amount of sheets into the amount of material amount it should output
transer_amt_to
Proc for transfering materials to another container.
use_amount_mat
Uses an amount of a specific material, effectively removing it.
use_materials
For consuming a dictionary of materials. mats is the map of materials to use and the corresponding amounts, example: list(M/datum/material/glass =100, datum/material/iron=200)
user_insert
Proc used for when player inserts materials