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.
cyborg_construction_stackRelated to above. Determines what stack will actually be put in machine when using cyborg stacks on construction to avoid spawning those on deconstruction.
energy_typeWhich robot_energy_storage to choose when this stack is created in cyborgs. Used only with /cyborg type stacks.
full_w_classThe weight class the stack has at amount > 2/3rds of max_amount
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.
protolathe_namefor icons when inserted in protolathe
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.
on_enteredSignal handler for connect_loc element. Called when a movable enters the turf we're currently occupying. Merges if 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.

cyborg_construction_stack

Related to above. Determines what stack will actually be put in machine when using cyborg stacks on construction to avoid spawning those on deconstruction.

energy_type

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

full_w_class

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

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.

protolathe_name

for icons when inserted in protolathe

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.

on_entered

Signal handler for connect_loc element. Called when a movable enters the turf we're currently occupying. Merges if possible.

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.