stack
Vars | |
absorption_capacity | How much blood flow this stack can absorb if used as a bandage on a cut wound. note that absorption is how much we lower the flow rate, not the raw amount of blood we suck up |
---|---|
absorption_rate | How quickly we lower the blood flow on a cut wound we're bandaging. Expected lifetime of this bandage in seconds is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first |
amount | How much is in this stack? |
burn_cleanliness_bonus | Like splint_factor but for burns instead of bone wounds. This is a multiplier used to speed up burn recoveries |
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 |
has_unique_girder | Does this stack require a unique girder in order to make a wall? |
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 given back to RCDs |
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 its sprites based on amount. |
radial_radius | If use_radial is TRUE, this is the radius of the radial |
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 |
splint_factor | If set and this used as a splint for a broken bone wound, This is used as a multiplier for applicable slowdowns (lower = better) (also for speeding up burn recoveries) |
stairs_type | What typepath stairs do we create from this stack |
tableVariant | What typepath table we create from this stack |
use_radial | If TRUE, we'll use a radial instead when displaying recipes |
Procs | |
add | |
build_recipe | Returns a list of properties of a given recipe |
building_checks | Checks if we can build here, validly. |
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. |
make_item | Makes the item with the given recipe. |
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_item_crafted | Run special logic on created items after they've been successfully crafted. |
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. |
radial_check | Used as a callback for radial building. |
recursively_build_recipes | Builds all recipes in a given recipe list and returns an association list containing them |
show_construction_radial | Shows a radial consisting of every radial recipe we have in our list. |
split_stack | |
update_custom_materials | Called to lazily update the materials of the item whenever the used or if more is added |
Var Details
absorption_capacity
How much blood flow this stack can absorb if used as a bandage on a cut wound. note that absorption is how much we lower the flow rate, not the raw amount of blood we suck up
absorption_rate
How quickly we lower the blood flow on a cut wound we're bandaging. Expected lifetime of this bandage in seconds is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first
amount
How much is in this stack?
burn_cleanliness_bonus
Like splint_factor but for burns instead of bone wounds. This is a multiplier used to speed up burn recoveries
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
has_unique_girder
Does this stack require a unique girder in order to make a wall?
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 given back to RCDs
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 its sprites based on amount.
radial_radius
If use_radial is TRUE, this is the radius of the radial
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
splint_factor
If set and this used as a splint for a broken bone wound, This is used as a multiplier for applicable slowdowns (lower = better) (also for speeding up burn recoveries)
stairs_type
What typepath stairs do we create from this stack
tableVariant
What typepath table we create from this stack
use_radial
If TRUE, we'll use a radial instead when displaying recipes
Proc Details
add
-
Adds some number of units to this stack.
-
Arguments:
-
- _amount: The number of units to add to this stack.
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
building_checks
Checks if we can build here, validly.
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.
make_item
Makes the item with the given recipe.
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_item_crafted
Run special logic on created items after they've been successfully crafted.
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.
radial_check
Used as a callback for radial building.
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
show_construction_radial
Shows a radial consisting of every radial recipe we have in our list.
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.
update_custom_materials
Called to lazily update the materials of the item whenever the used or if more is added