Yogstation 13 - Modules - TypesProc Details

/datum/component/material_container

Procs

InitializeSets up the proper signals and fills the list of materials with the appropriate references.
OnAttackByProc that allows players to fill the parent with mats
amount2sheetTurns a material amount into the amount of sheets it should output
can_insert_amount_matProc for checking if there is room in the component, returning the amount or else the amount lacking.
get_categoriesReturns all the categories in a recipe.
get_item_material_amountreturns 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_amountReturns the amount of a specific material in this container.
has_enough_of_categoryReturns TRUE if you have enough of a specified material category (Which could be multiple materials)
has_enough_of_materialReturns TRUE if you have enough of the specified material.
has_materialsChecks if its possible to afford a certain amount of materials. Takes a dictionary of materials.
has_spaceProc that returns TRUE if the container has space
insert_amount_matFor inserting an amount of material
insert_itemProc specifically for inserting items, returns the amount of materials entered.
insert_stackProc for putting a stack inside of the container
retrieve_allProc to get all the materials and dump them as sheets
retrieve_sheetsFor spawning mineral sheets at a specific location. Used by machines to output sheets.
sheet2amountTurns an amount of sheets into the amount of material amount it should output
transer_amt_toProc for transfering materials to another container.
use_amount_matUses an amount of a specific material, effectively removing it.
use_materialsFor 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_insertProc 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.

insert_stack

Proc for putting a stack inside of the container

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