/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 and custom materials 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

custom_nameThe custom name attached to the original name of the holder, to pass down if processed into new instances.
fill_typeType of fill, can be [CUSTOM_INGREDIENT_ICON_NOCHANGE] for example.
filling_colorsList of colors to be used for fillings, to pass down if processed into new instances.
ingredient_namesStores the names of the ingredients used on the holder, to pass down if processed into new instances.
ingredient_typeType of ingredients to accept, [CUSTOM_INGREDIENT_TYPE_EDIBLE] for example.
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.
apply_fillAdd a filling overlay to the parent atom.
custom_adjectiveGives an adjective to describe the size of the custom food.
customizable_attackHandles when the customizable food is attacked by something.
food_exitedClear refs if our food "goes away" somehow
get_fillExtract the filling color from the ingredient, than calls apply_fill()
handle_materialsRebuilds the custom materials the holder is composed of based on the materials of each 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 fillings and name of 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:
set_custom_nameGives the type of custom food (based on what the first ingredient was).
valid_ingredientProc that checks if an ingredient is valid or not, returning false if it isnt and true if it is.

Var Details

custom_name

The custom name attached to the original name of the holder, to pass down if processed into new instances.

fill_type

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

filling_colors

List of colors to be used for fillings, to pass down if processed into new instances.

ingredient_names

Stores the names of the ingredients used on the holder, to pass down if processed into new instances.

ingredient_type

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

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.

apply_fill

Add a filling overlay to the parent atom.

custom_adjective

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

customizable_attack

Handles when the customizable food is attacked by something.

food_exited

Clear refs if our food "goes away" somehow

get_fill

Extract the filling color from the ingredient, than calls apply_fill()

handle_materials

Rebuilds the custom materials the holder is composed of based on the materials of each 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 fillings and name of 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:

set_custom_name

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

valid_ingredient

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