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

takes_reagent_appearance

"Takes reagent appearance" Component

Bit of a mouthful, but when applied to an item that can hold reagents (primarily reagent containers), said item will take on an appearance based on the majority share reagent inside

This is more than just "changing the color a bit" or "applies an overlay", this is an entire icon / icon state / name change, making it look like a different item entirely

This is done by cross-referencing the glass style datums. See /datum/glass_style for more information about that.

An example usage is bartender mixed drinks - each reagent gets its own fancy drink sprite

Vars

base_container_typeThe type to compare against the glass_style's required_container_type. The parent's type by default.
icon_pre_changeIcon file when attached to the item
icon_state_pre_changeIcon state when attached to the item
on_icon_changedOptional callback invoked when when the item's appearance is changed
on_icon_resetOptional callback invoked when our item has its appearance reverted to default

Procs

get_main_reagent_styleGets the correspinding style based on the parent's state and reagents within
on_update_appearanceSignal proc for COMSIG_ATOM_UPDATE_APPEARANCE We hook into the update appearance proc to perform our own update based on our glass style Preventing any further updates down the line on successes
update_descPerforms the description update.
update_iconPerforms the icon update.
update_namePerforms the name update.

Var Details

base_container_type

The type to compare against the glass_style's required_container_type. The parent's type by default.

icon_pre_change

Icon file when attached to the item

icon_state_pre_change

Icon state when attached to the item

on_icon_changed

Optional callback invoked when when the item's appearance is changed

on_icon_reset

Optional callback invoked when our item has its appearance reverted to default

Proc Details

get_main_reagent_style

Gets the correspinding style based on the parent's state and reagents within

on_update_appearance

Signal proc for COMSIG_ATOM_UPDATE_APPEARANCE We hook into the update appearance proc to perform our own update based on our glass style Preventing any further updates down the line on successes

update_desc

Performs the description update.

update_icon

Performs the icon update.

update_name

Performs the name update.