quirk ![code/datums/quirks/_quirk.dm 3](git.png)
Vars | |
abstract_parent_type | When making an abstract quirk (in OOP terms), don't forget to set this var to the type path for that abstract quirk. |
---|---|
desc | The description of the quirk |
gain_text | Text displayed when this quirk is assigned to a mob (and not transferred) |
hardcore_value | Amount of points this trait is worth towards the hardcore character mode. Minus points implies a positive quirk, positive means its hard. This is used to pick the quirks assigned to a hardcore character. / 0 means its not available to hardcore draws. |
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) |
mail_goodies | A lazylist of items people can receive from mail who have this quirk enabled The base weight for the each quirk's mail goodies list to be selected is 5 then the item selected is determined by pick(selected_quirk.mail_goodies) |
maximum_process_stat | max stat below which this quirk can process (if it has QUIRK_PROCESSES) and above which it stops. If null, then it will process regardless of stat. |
medical_record_text | This text will appear on medical records for the trait. |
mob_trait | if applicable, apply and remove this mob trait |
name | The name of the quirk |
no_process_traits | A list of traits that should stop this quirk from processing.
Signals for adding and removing this trait will automatically be added to process_update_signals . |
process_update_signals | A list of additional signals to register with update_process() |
quirk_flags | Flags related to this quirk. |
quirk_holder | Reference to the mob currently tied to this quirk datum. Quirks are not singletons. |
value | What the quirk is worth in preferences, zero = neutral / free |
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. |
on_stat_changed | Updates processing status whenever the mob's stat changes. |
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. |
should_process | Returns if the quirk holder should process currently or not. |
update_process | Checks to see if the quirk should be processing, and starts/stops it. |
Var Details
abstract_parent_type ![code/datums/quirks/_quirk.dm 28](git.png)
When making an abstract quirk (in OOP terms), don't forget to set this var to the type path for that abstract quirk.
desc ![code/datums/quirks/_quirk.dm 7](git.png)
The description of the quirk
gain_text ![code/datums/quirks/_quirk.dm 15](git.png)
Text displayed when this quirk is assigned to a mob (and not transferred)
hardcore_value ![code/datums/quirks/_quirk.dm 26](git.png)
Amount of points this trait is worth towards the hardcore character mode. Minus points implies a positive quirk, positive means its hard. This is used to pick the quirks assigned to a hardcore character. / 0 means its not available to hardcore draws.
icon ![code/datums/quirks/_quirk.dm 31](git.png)
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 ![code/datums/quirks/_quirk.dm 17](git.png)
Text displayed when this quirk is removed from a mob (and not transferred)
mail_goodies ![code/datums/quirks/_quirk.dm 35](git.png)
A lazylist of items people can receive from mail who have this quirk enabled The base weight for the each quirk's mail goodies list to be selected is 5 then the item selected is determined by pick(selected_quirk.mail_goodies)
maximum_process_stat ![code/datums/quirks/_quirk.dm 38](git.png)
max stat below which this quirk can process (if it has QUIRK_PROCESSES) and above which it stops. If null, then it will process regardless of stat.
medical_record_text ![code/datums/quirks/_quirk.dm 19](git.png)
This text will appear on medical records for the trait.
mob_trait ![code/datums/quirks/_quirk.dm 21](git.png)
if applicable, apply and remove this mob trait
name ![code/datums/quirks/_quirk.dm 5](git.png)
The name of the quirk
no_process_traits ![code/datums/quirks/_quirk.dm 45](git.png)
A list of traits that should stop this quirk from processing.
Signals for adding and removing this trait will automatically be added to process_update_signals
.
process_update_signals ![code/datums/quirks/_quirk.dm 40](git.png)
A list of additional signals to register with update_process()
quirk_flags ![code/datums/quirks/_quirk.dm 11](git.png)
Flags related to this quirk.
quirk_holder ![code/datums/quirks/_quirk.dm 13](git.png)
Reference to the mob currently tied to this quirk datum. Quirks are not singletons.
value ![code/datums/quirks/_quirk.dm 9](git.png)
What the quirk is worth in preferences, zero = neutral / free
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.
on_stat_changed
Updates processing status whenever the mob's stat changes.
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.
should_process
Returns if the quirk holder should process currently or not.
update_process
Checks to see if the quirk should be processing, and starts/stops it.