/tg/ Station 13 - Modules - TypesVar Details - Proc Details

Custom Atom Component

When added to an atom, item ingredients can be put into that. The sprite is updated and reagents are transferred.

If the component is added to something that is processed, creating new objects (being cut, for example), the replacement type needs to also have the component. The ingredients will be copied over. Reagents are not copied over since other components already take care of that.

Vars

fill_typeType of fill, can be [CUSTOM_INGREDIENT_ICON_NOCHANGE] for example.
ingredient_typeType of ingredients to accept, [CUSTOM_INGREDIENT_TYPE_EDIBLE] for example.
ingredientsList of item ingredients.
max_ingredientsNumber of max ingredients.
replacementType path of replacement atom.
screentip_verbAdds screentips for all items that call on this proc, defaults to "Add"
top_overlayOverlay used for certain fill types, always shows up on top.

Procs

add_ingredientAdds a new ingredient and updates the parent's name.
custom_adjectiveGives an adjective to describe the size of the custom food.
custom_typeGives the type of custom food (based on what the first ingredient was).
customizable_attackHandles when the customizable food is attacked by something.
food_exitedClear refs if our food "goes away" somehow
handle_fillHandles the icon update for a new ingredient.
handle_reagentsTakes the reagents from an ingredient.
mix_colorReturns the color of the input mixed with the top_overlay's color.
on_examineHandles when the customizable food is examined.
on_processedCopies over the parent's ingredients to the processing results (such as slices when the parent is cut).
on_requesting_context_from_itemAdds context sensitivy directly to the customizable reagent holder file for screentips Arguments:
valid_ingredientProc that checks if an ingredient is valid or not, returning false if it isnt and true if it is.

Var Details

fill_type

Type of fill, can be [CUSTOM_INGREDIENT_ICON_NOCHANGE] for example.

ingredient_type

Type of ingredients to accept, [CUSTOM_INGREDIENT_TYPE_EDIBLE] for example.

ingredients

List of item ingredients.

max_ingredients

Number of max ingredients.

replacement

Type path of replacement atom.

screentip_verb

Adds screentips for all items that call on this proc, defaults to "Add"

top_overlay

Overlay used for certain fill types, always shows up on top.

Proc Details

add_ingredient

Adds a new ingredient and updates the parent's name.

custom_adjective

Gives an adjective to describe the size of the custom food.

custom_type

Gives the type of custom food (based on what the first ingredient was).

customizable_attack

Handles when the customizable food is attacked by something.

food_exited

Clear refs if our food "goes away" somehow

handle_fill

Handles the icon update for a new ingredient.

handle_reagents

Takes the reagents from an ingredient.

mix_color

Returns the color of the input mixed with the top_overlay's color.

on_examine

Handles when the customizable food is examined.

on_processed

Copies over the parent's ingredients to the processing results (such as slices when the parent is cut).

on_requesting_context_from_item

Adds context sensitivy directly to the customizable reagent holder file for screentips Arguments:

valid_ingredient

Proc that checks if an ingredient is valid or not, returning false if it isnt and true if it is.