quirk
Vars | |
gain_text | Text displayed when this quirk is assigned to a mob (and not transferred) |
---|---|
icon | The icon to show in the preferences menu. This references a tgui icon, so it can be FontAwesome or a tgfont (with a tg- prefix). |
lose_text | Text displayed when this quirk is removed from a mob (and not transferred) |
medical_record_text | This text will appear on medical records for the trait. Not yet implemented |
quirk_flags | Flags related to this quirk. |
quirk_genre | If the quirk is a Boon, Bane, or Neutral |
quirk_holder | Reference to the mob currently tied to this quirk datum. Quirks are not singletons. |
Procs | |
add | Any effect that should be applied every single time the quirk is added to any mob, even when transferred. |
add_to_holder | Adds the quirk to a new quirk_holder. |
add_unique | Any effects from the proc that should not be done multiple times if the quirk is transferred between mobs. Put stuff like spawning items in here. |
on_holder_qdeleting | Called when quirk_holder is qdeleting. Simply qdels this datum and lets Destroy() handle the rest. |
on_quirk_holder_first_login | On client connection set quirk preferences. |
post_add | Any special effects or chat messages which should be applied. This proc is guaranteed to run if the mob has a client when the quirk is added. Otherwise, it runs once on the next COMSIG_MOB_LOGIN. |
remove | Removal of any reversible effects added by the quirk. |
remove_from_current_holder | Removes the quirk from the current quirk_holder. |
Var Details
gain_text
Text displayed when this quirk is assigned to a mob (and not transferred)
icon
The icon to show in the preferences menu. This references a tgui icon, so it can be FontAwesome or a tgfont (with a tg- prefix).
lose_text
Text displayed when this quirk is removed from a mob (and not transferred)
medical_record_text
This text will appear on medical records for the trait. Not yet implemented
quirk_flags
Flags related to this quirk.
quirk_genre
If the quirk is a Boon, Bane, or Neutral
quirk_holder
Reference to the mob currently tied to this quirk datum. Quirks are not singletons.
Proc Details
add
Any effect that should be applied every single time the quirk is added to any mob, even when transferred.
add_to_holder
Adds the quirk to a new quirk_holder.
Performs logic to make sure new_holder is a valid holder of this quirk. Returns FALSEy if there was some kind of error. Returns TRUE otherwise. Arguments:
- new_holder - The mob to add this quirk to.
- quirk_transfer - If this is being added to the holder as part of a quirk transfer. Quirks can use this to decide not to spawn new items or apply any other one-time effects.
add_unique
Any effects from the proc that should not be done multiple times if the quirk is transferred between mobs. Put stuff like spawning items in here.
on_holder_qdeleting
Called when quirk_holder is qdeleting. Simply qdels this datum and lets Destroy() handle the rest.
on_quirk_holder_first_login
On client connection set quirk preferences.
Run post_add to set the client preferences for the quirk. Clear the attached signal for login. Used when the quirk has been gained and no client is attached to the mob.
post_add
Any special effects or chat messages which should be applied. This proc is guaranteed to run if the mob has a client when the quirk is added. Otherwise, it runs once on the next COMSIG_MOB_LOGIN.
remove
Removal of any reversible effects added by the quirk.
remove_from_current_holder
Removes the quirk from the current quirk_holder.