[NON-MODULAR] Porting audible emotes from oldbase. (#2795)

* Committing a draft. Currently non-functional.

* Currently stable, a little testing left.

* Functioning as intended!

* why do i forget these thingssssss (proper comments added)
This commit is contained in:
Sza'Thi
2021-02-04 17:08:32 +00:00
committed by GitHub
parent e34818b864
commit f1fa6469d6
3 changed files with 73 additions and 8 deletions
+40 -2
View File
@@ -432,8 +432,17 @@ GLOBAL_LIST_INIT(message_modes_stat_limits, list(
return ITALICS | REDUCE_RANGE
return 0
/mob/living/say_mod(input, list/message_mods = list())
//SKYRAT custom sayverb
/mob/living/say_mod(input, message_mods)
if(message_mods == MODE_WHISPER_CRIT)
return ..()
if((input[1] == "!") && (length_char(input) > 1))
message_mods = MODE_CUSTOM_SAY
return copytext_char(input, 3)
var/customsayverb = findtext(input, "*")
if(customsayverb)
message_mods = MODE_CUSTOM_SAY
return lowertext(copytext_char(input, 1, customsayverb))
if(message_mods[WHISPER_MODE] == MODE_WHISPER)
. = verb_whisper
else if(message_mods[WHISPER_MODE] == MODE_WHISPER_CRIT)
@@ -453,6 +462,35 @@ GLOBAL_LIST_INIT(message_modes_stat_limits, list(
else
. = ..()
/proc/uncostumize_say(input, message_mods)
. = input
if(message_mods == MODE_CUSTOM_SAY)
var/customsayverb = findtext(input, "*")
return lowertext(copytext_char(input, 1, customsayverb))
//SKYRAT custom sayverb end.
/* original code:
/mob/living/say_mod(input, list/message_mods = list())
if(message_mods[WHISPER_MODE] == MODE_WHISPER)
. = verb_whisper
else if(message_mods[WHISPER_MODE] == MODE_WHISPER_CRIT)
. = "[verb_whisper] in [p_their()] last breath"
else if(message_mods[MODE_SING])
. = verb_sing
else if(stuttering)
if(HAS_TRAIT(src, TRAIT_SIGN_LANG))
. = "shakily signs"
else
. = "stammers"
else if(derpspeech)
if(HAS_TRAIT(src, TRAIT_SIGN_LANG))
. = "incoherently signs"
else
. = "gibbers"
else
. = ..()
*/
/mob/living/whisper(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
if(!message)
return