Yogstation 13 - Modules - TypesVar Details - Proc Details

/obj/item/stack

Vars

amountHow much is in this stack?
costRelated to above. How much energy it costs from storage to use stack items
full_w_classThe weight class the stack has at amount > 2/3rds max_amount
is_cyborgIf TRUE, this stack is a module used by a cyborg (doesn't run out like normal / etc)
material_typeDatum material type that this stack is made of
mats_per_unitList that tells you how much is in a single unit.
matter_amountAmount of matter for RCD
max_amountHow much is allowed in this stack?
merge_typeThis path and its children should merge with this stack, defaults to src.type
novariantsDetermines whether the item should update it's sprites based on amount.
recipesA list to all recipies this stack item can create.
singular_nameWhat's the name of just 1 of this stack. You have a stack of leather, but one piece of leather
sourceRelated to above. If present, the energy we draw from when using stack items, for cyborgs
strictDoes it merge strictly only with its type

Procs

add
build_recipeReturns a list of properties of a given recipe
can_merge
is_valid_recipeChecks if the recipe is valid to be used
is_zero_amountReturns TRUE if the item stack is the equivalent of a 0 amount item.
mergeMerges as much of src into target_stack as possible. If present, the limit arg overrides target_stack.max_amount for transfer.
merge_without_delMerges as much of src into target_stack as possible. If present, the limit arg overrides target_stack.max_amount for transfer.
recursively_build_recipesBuilds all recipes in a given recipe list and returns an association list containing them
set_custom_materialsOverride to make things like metalgen accurately set custom materials
set_mats_per_unit
update_custom_materialsUpdates the custom materials list of this stack.

Var Details

amount

How much is in this stack?

cost

Related to above. How much energy it costs from storage to use stack items

full_w_class

The weight class the stack has at amount > 2/3rds max_amount

is_cyborg

If TRUE, this stack is a module used by a cyborg (doesn't run out like normal / etc)

material_type

Datum material type that this stack is made of

mats_per_unit

List that tells you how much is in a single unit.

matter_amount

Amount of matter for RCD

max_amount

How much is allowed in this stack?

merge_type

This path and its children should merge with this stack, defaults to src.type

novariants

Determines whether the item should update it's sprites based on amount.

recipes

A list to all recipies this stack item can create.

singular_name

What's the name of just 1 of this stack. You have a stack of leather, but one piece of leather

source

Related to above. If present, the energy we draw from when using stack items, for cyborgs

strict

Does it merge strictly only with its type

Proc Details

add

build_recipe

Returns a list of properties of a given recipe

Arguments:

can_merge

is_valid_recipe

Checks if the recipe is valid to be used

Arguments:

is_zero_amount

Returns TRUE if the item stack is the equivalent of a 0 amount item.

Also deletes the item if delete_if_zero is TRUE and the stack does not have is_cyborg set to true.

merge

Merges as much of src into target_stack as possible. If present, the limit arg overrides target_stack.max_amount for transfer.

This proc deletes src if the remaining amount after the transfer is 0.

merge_without_del

Merges as much of src into target_stack as possible. If present, the limit arg overrides target_stack.max_amount for transfer.

This calls use() without check = FALSE, preventing the item from qdeling itself if it reaches 0 stack size.

As a result, this proc can leave behind a 0 amount stack.

recursively_build_recipes

Builds all recipes in a given recipe list and returns an association list containing them

Arguments:

set_custom_materials

Override to make things like metalgen accurately set custom materials

set_mats_per_unit

update_custom_materials

Updates the custom materials list of this stack.