Skip to content

Commit

Permalink
[MIRROR] *Me invoked via verb defaults to visible | audible, rather…
Browse files Browse the repository at this point in the history
… than just audible (#2554)

* `*Me` invoked via verb defaults to visible | audible, rather than just audible (#83283)

## About The Pull Request

`*me` emotes invoked via the verb (or TGUI say) now default to visible |
audible, rather than just audible

Also adds a description on how to set your `*me` emotes to the verb.
(Doesn't work for TGUI say unfortunately)

## Why It's Good For The Game

I don't know why these are set to audible by default, that's just kinda
weird considering 95% of custom emotes are not audible

Both is best of both worlds, ensures deaf and blind people can see their
own custom emotes at the very least.

## Changelog

:cl: Melbert
qol: Custom emotes now default to both visible and audible rather than
just audible
qol: Invoking the custom emote verb now explains how to set your custom
emote to visible or audible
/:cl:

* `*Me` invoked via verb defaults to visible | audible, rather than just audible

---------

Co-authored-by: MrMelbert <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed May 20, 2024
1 parent d2b918f commit d579441
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion code/modules/mob/living/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -662,13 +662,15 @@
return stripped_multiline_input(usr, "Choose an emote to display.", "Me" , null, MAX_MESSAGE_LEN) // NOVA EDIT CHANGE - ORIGINAL : return copytext(sanitize(input("Choose an emote to display.") as text|null), 1, MAX_MESSAGE_LEN)

/datum/emote/living/custom/proc/get_custom_emote_type_from_user()
var/type = input("Is this a visible or hearable emote?") as null|anything in list("Visible", "Hearable")
var/type = input("Is this a visible or hearable emote?") as null|anything in list("Visible", "Hearable", "Both")

switch(type)
if("Visible")
return EMOTE_VISIBLE
if("Hearable")
return EMOTE_AUDIBLE
if("Both")
return EMOTE_VISIBLE | EMOTE_AUDIBLE
else
tgui_alert(usr,"Unable to use this emote, must be either hearable or visible.")
return FALSE
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/mob_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@
/mob/verb/me_verb(message as text)
set name = "Me"
set category = "IC"
set desc = "Perform a custom emote. Leave blank to pick between an audible or a visible emote (Defaults to visible)."

if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, span_danger("Speech is currently admin-disabled."))
return

message = trim(copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN))

QUEUE_OR_CALL_VERB_FOR(VERB_CALLBACK(src, TYPE_PROC_REF(/mob, emote), "me", 1, message, TRUE), SSspeech_controller)
QUEUE_OR_CALL_VERB_FOR(VERB_CALLBACK(src, TYPE_PROC_REF(/mob, emote), "me", EMOTE_VISIBLE|EMOTE_AUDIBLE, message, TRUE), SSspeech_controller)

/mob/try_speak(message, ignore_spam = FALSE, forced = null, filterproof = FALSE)
var/list/filter_result
Expand Down

0 comments on commit d579441

Please sign in to comment.