material_container
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. |
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 |
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.
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