stack
Vars | |
material_type | Datum material type that this stack is made of |
---|---|
Procs | |
build_recipe | Returns a list of properties of a given recipe |
can_merge | |
is_valid_recipe | Checks if the recipe is valid to be used |
is_zero_amount | Returns TRUE if the item stack is the equivalent of a 0 amount item. |
merge | Merges as much of src into target_stack as possible. If present, the limit arg overrides target_stack.max_amount for transfer. |
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. |
on_movable_entered_occupied_turf | Signal handler for connect_loc element. Called when a movable enters the turf we're currently occupying. Merges if possible. |
recursively_build_recipes | Builds all recipes in a given recipe list and returns an association list containing them |
split_stack |
Var Details
material_type
Datum material type that this stack is made of
Proc Details
build_recipe
Returns a list of properties of a given recipe
Arguments:
- R - The stack recipe we are using to get a list of properties
can_merge
-
Checks whether this stack can merge itself into another stack.
-
Arguments:
-
- check: The stack to check for mergeability.
-
- [inhand][boolean]: Whether or not the stack to check should act like it's in a mob's hand.
is_valid_recipe
Checks if the recipe is valid to be used
Arguments:
- R - The stack recipe we are checking if it is valid
- recipe_list - The list of recipes we are using to check the given recipe
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.
on_movable_entered_occupied_turf
Signal handler for connect_loc element. Called when a movable enters the turf we're currently occupying. Merges if possible.
recursively_build_recipes
Builds all recipes in a given recipe list and returns an association list containing them
Arguments:
- recipe_to_iterate - The list of recipes we are using to build recipes
split_stack
-
Splits the stack into two stacks.
-
Arguments:
-
- user: The mob splitting the stack.
-
- amount: The number of units to split from this stack.