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_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. |
Procs | |
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. |
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:
- source - refers to item that will display its screentip
- context - refers to, in this case, an item that can be customized with other reagents or ingrideints
- held_item - refers to the item in your hand, which is hopefully an ingredient
- user - refers to user who will see the screentip when the proper context and tool are there
valid_ingredient
Proc that checks if an ingredient is valid or not, returning false if it isnt and true if it is.