Daedalus Dock - Modules - TypesVar Details - Proc Details

material_container

Vars

after_insertA callback invoked after materials are inserted into this container
allowed_item_typecacheThe typecache of things that this material container can accept
allowed_materialsThe list of materials that this material container can accept
insertion_checkA callback for checking wheter we can insert a material into this container
last_inserted_idThe last main material that was inserted into this container
mat_container_flagsThe material container flags. See __DEFINES/materials.dm.
materialsMap of material ref -> amount
max_amountThe maximum amount of materials this material container can contain
precise_insertionWhether or not this material container allows specific amounts from sheets to be inserted
preconditionA callback invoked before materials are inserted into this container
total_amountThe total amount of materials this material container contains

Procs

InitializeSets up the proper signals and fills the list of materials with the appropriate references.
amount2sheetTurns a material amount into the amount of sheets it should output
can_hold_materialThe default check for whether we can add materials to this material container.
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_item_materialsInserts the relevant materials from an item into this material container.
on_attackbyProc that allows players to fill the parent with mats
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.
ui_dataList format is list(material_name = list(amount = ..., ref = ..., etc.))
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

Var Details

after_insert

A callback invoked after materials are inserted into this container

allowed_item_typecache

The typecache of things that this material container can accept

allowed_materials

The list of materials that this material container can accept

insertion_check

A callback for checking wheter we can insert a material into this container

last_inserted_id

The last main material that was inserted into this container

mat_container_flags

The material container flags. See __DEFINES/materials.dm.

materials

Map of material ref -> amount

max_amount

The maximum amount of materials this material container can contain

precise_insertion

Whether or not this material container allows specific amounts from sheets to be inserted

precondition

A callback invoked before materials are inserted into this container

total_amount

The total amount of materials this material container contains

Proc Details

Initialize

Sets up the proper signals and fills the list of materials with the appropriate references.

amount2sheet

Turns a material amount into the amount of sheets it should output

can_hold_material

The default check for whether we can add materials to this material container.

Arguments:

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_item_materials

Inserts the relevant materials from an item into this material container.

Arguments:

on_attackby

Proc that allows players to fill the parent with mats

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.

ui_data

List format is list(material_name = list(amount = ..., ref = ..., etc.))

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