byond - Modules - TypesVar Details - Proc Details

/datum/component/label

The label component.

This component is used to manage labels applied by the hand labeler.

Atoms can only have one instance of this component, and therefore only one label at a time. This is to avoid having names like "Backpack (label1) (label2) (label3)". This is annoying and abnoxious to read.

When a player clicks the atom with a hand labeler to apply a label, this component gets applied to it. If the labeler is off, the component will be removed from it, and the label will be removed from its name.

Vars

label_nameThe name of the label the player is applying to the parent.

Procs

ExamineThis proc will trigger when someone examines the parent. It will attach the text found in the body of the proc to the examine_list and display it to the player examining the parent.
InheritComponentThis proc will fire after the parent is hit by a hand labeler which is trying to apply another label. Since the parent already has a label, it will remove the old one from the parent's name, and apply the new one.
OnAttackbyThis proc will trigger when any object is used to attack the parent.
apply_labelApplies a label to the name of the parent in the format of: "parent_name (label)"
remove_labelRemoves the label from the parent's name

Var Details

label_name

The name of the label the player is applying to the parent.

Proc Details

Examine

This proc will trigger when someone examines the parent. It will attach the text found in the body of the proc to the examine_list and display it to the player examining the parent.

Arguments:

InheritComponent

This proc will fire after the parent is hit by a hand labeler which is trying to apply another label. Since the parent already has a label, it will remove the old one from the parent's name, and apply the new one.

OnAttackby

This proc will trigger when any object is used to attack the parent.

If the attacking object is not a hand labeler, it will return. If the attacking object is a hand labeler it will restore the name of the parent to what it was before this component was added to it, and the component will be deleted.

Arguments:

apply_label

Applies a label to the name of the parent in the format of: "parent_name (label)"

remove_label

Removes the label from the parent's name