Emote
Most of the text that's not someone talking is based off of this.
Yes, the displayed message is stored on the datum, it would cause problems for emotes with a message that can vary, but that's handled differently in run_emote(), so be sure to use can_message_change if you plan to have different displayed messages from player to player.
Vars | |
affected_by_pitch | If this emote's sound is affected by TTS pitch |
---|---|
can_message_change | Does this message have a message that can be modified by the user? |
cooldown | The cooldown between the uses of the emote. |
emote_type | Whether the emote is visible and/or audible bitflag |
general_emote_audio_cooldown | How long is the shared emote cooldown triggered by this emote? |
hands_use_check | Checks if the mob can use its hands before performing the emote. |
key | What calls the emote. |
key_third_person | This will also call the emote. |
message | Message displayed when emote is used. |
message_AI | Message displayed if the user is an AI. |
message_alien | Message displayed if the user is a grown alien. |
message_animal_or_basic | Message to display if the user is a simple_animal or basic mob. |
message_larva | Message displayed if the user is an alien larva. |
message_mime | Message displayed if the user is a mime. |
message_monkey | Message displayed if the user is a monkey. |
message_param | Message with %t at the end to allow adding params to the message, like for mobs doing an emote relatively to something else. |
message_robot | Message displayed if the user is a robot. |
mob_type_allowed_typecache | Types that are allowed to use that emote. |
mob_type_blacklist_typecache | Types that are NOT allowed to use that emote. |
mob_type_ignore_stat_typecache | Types that can use this emote regardless of their state. |
name | Needed for more user-friendly emote names, so emotes with keys like "aflap" will show as "flap angry". Defaulted to key. |
only_forced_audio | Can only code call this event instead of the player. |
sound | Sound to play when emote is called. |
sound_wall_ignore | Does this emote's sound ignore walls? |
specific_emote_audio_cooldown | How long is the specific emote cooldown triggered by this emote? |
stat_allowed | In which state can you use this emote? (Check stat.dm for a full list of them) |
trait_required | Trait that is required to use this emote. |
vary | Does this emote vary in pitch? |
Procs | |
can_run_emote | Check to see if the user is allowed to run the emote. |
check_cooldown | For handling emote cooldown, return true to allow the emote to happen. |
get_sound | To get the sound that the emote plays, for special sound interactions depending on the mob. |
replace_pronoun | To replace pronouns in the inputed string with the user's proper pronouns. |
run_emote | Handles the modifications and execution of emotes. |
select_message_type | Selects the message type to override the message with. |
select_param | Replaces the %t in the message in message_param by params. |
should_play_sound | Check to see if the user should play a sound when performing the emote. |
Var Details
affected_by_pitch
If this emote's sound is affected by TTS pitch
can_message_change
Does this message have a message that can be modified by the user?
cooldown
The cooldown between the uses of the emote.
emote_type
Whether the emote is visible and/or audible bitflag
general_emote_audio_cooldown
How long is the shared emote cooldown triggered by this emote?
hands_use_check
Checks if the mob can use its hands before performing the emote.
key
What calls the emote.
key_third_person
This will also call the emote.
message
Message displayed when emote is used.
message_AI
Message displayed if the user is an AI.
message_alien
Message displayed if the user is a grown alien.
message_animal_or_basic
Message to display if the user is a simple_animal or basic mob.
message_larva
Message displayed if the user is an alien larva.
message_mime
Message displayed if the user is a mime.
message_monkey
Message displayed if the user is a monkey.
message_param
Message with %t at the end to allow adding params to the message, like for mobs doing an emote relatively to something else.
message_robot
Message displayed if the user is a robot.
mob_type_allowed_typecache
Types that are allowed to use that emote.
mob_type_blacklist_typecache
Types that are NOT allowed to use that emote.
mob_type_ignore_stat_typecache
Types that can use this emote regardless of their state.
name
Needed for more user-friendly emote names, so emotes with keys like "aflap" will show as "flap angry". Defaulted to key.
only_forced_audio
Can only code call this event instead of the player.
sound
Sound to play when emote is called.
sound_wall_ignore
Does this emote's sound ignore walls?
specific_emote_audio_cooldown
How long is the specific emote cooldown triggered by this emote?
stat_allowed
In which state can you use this emote? (Check stat.dm for a full list of them)
trait_required
Trait that is required to use this emote.
vary
Does this emote vary in pitch?
Proc Details
can_run_emote
Check to see if the user is allowed to run the emote.
Arguments:
- user - Person that is trying to send the emote.
- status_check - Bool that says whether we should check their stat or not.
- intentional - Bool that says whether the emote was forced (FALSE) or not (TRUE).
- params - Parameters added after the emote.
Returns a bool about whether or not the user can run the emote.
check_cooldown
For handling emote cooldown, return true to allow the emote to happen.
Arguments:
- user - Person that is trying to send the emote.
- intentional - Bool that says whether the emote was forced (FALSE) or not (TRUE).
Returns FALSE if the cooldown is not over, TRUE if the cooldown is over.
get_sound
To get the sound that the emote plays, for special sound interactions depending on the mob.
Arguments:
- user - Person that is trying to send the emote.
Returns the sound that will be made while sending the emote.
replace_pronoun
To replace pronouns in the inputed string with the user's proper pronouns.
Arguments:
- user - Person that is trying to send the emote.
- msg - The string to modify.
Returns the modified msg string.
run_emote
Handles the modifications and execution of emotes.
Arguments:
- user - Person that is trying to send the emote.
- params - Parameters added after the emote.
- type_override - Override to the current emote_type.
- intentional - Bool that says whether the emote was forced (FALSE) or not (TRUE).
select_message_type
Selects the message type to override the message with.
Arguments:
- user - Person that is trying to send the emote.
- msg - The string to modify.
- intentional - Bool that says whether the emote was forced (FALSE) or not (TRUE).
Returns the new message, or msg directly, if no change was needed.
select_param
Replaces the %t in the message in message_param by params.
Arguments:
- user - Person that is trying to send the emote.
- params - Parameters added after the emote.
Returns the modified string.
should_play_sound
Check to see if the user should play a sound when performing the emote.
Arguments:
- user - Person that is doing the emote.
- intentional - Bool that says whether the emote was forced (FALSE) or not (TRUE).
Returns a bool about whether or not the user should play a sound when performing the emote.