Space Station 13 - Modules - TypesVar Details - Proc Details

stack

Vars

amountThe current amount of this stack.
costHow much energy using 1 sheet from the stack costs. Used only with /cyborg type stacks.
dynamic_icon_stateWhether this stack has a dynamic icon_state based on amount / max_amount.
energy_typeWhich robot_energy_storage to choose when this stack is created in cyborgs. Used only with /cyborg type stacks.
is_cyborgWhether this stack is a /cyborg subtype or not.
max_amountThe maximum amount of this stack. Also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
merge_typeThe path and its children that should merge with this stack, defaults to src.type.
parent_stackWhether this stack can't stack with subtypes.
recipesA list of recipes buildable with this stack.
singular_nameThe singular name of this stack.
sourceThe storage datum that will be used with this stack. Used only with /cyborg type stacks.
table_typeThe type of table that is made when applying this stack to a frame.

Procs

can_merge
is_zero_amountReturns TRUE if the item stack is the equivalent of a 0 amount item.
mergeMerges as much of src into material as possible.
merge_without_delMerges as much of src into material as possible.
recursively_build_recipesRecursively builds the recipes data for the given list of recipes, iterating through each recipe. If recipe is of type /datum/stack_recipe, it adds the recipe data to the recipes_data list with the title as the key. If recipe is of type /datum/stack_recipe_list, it recursively calls itself, scanning the entire list and adding each recipe to its category.

Var Details

amount

The current amount of this stack.

cost

How much energy using 1 sheet from the stack costs. Used only with /cyborg type stacks.

dynamic_icon_state

Whether this stack has a dynamic icon_state based on amount / max_amount.

energy_type

Which robot_energy_storage to choose when this stack is created in cyborgs. Used only with /cyborg type stacks.

is_cyborg

Whether this stack is a /cyborg subtype or not.

max_amount

The maximum amount of this stack. Also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount

merge_type

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

parent_stack

Whether this stack can't stack with subtypes.

recipes

A list of recipes buildable with this stack.

singular_name

The singular name of this stack.

source

The storage datum that will be used with this stack. Used only with /cyborg type stacks.

table_type

The type of table that is made when applying this stack to a frame.

Proc Details

can_merge

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 material as possible.

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

merge_without_del

Merges as much of src into material as possible.

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

Recursively builds the recipes data for the given list of recipes, iterating through each recipe. If recipe is of type /datum/stack_recipe, it adds the recipe data to the recipes_data list with the title as the key. If recipe is of type /datum/stack_recipe_list, it recursively calls itself, scanning the entire list and adding each recipe to its category.