Trying to talk with oxygen damage makes you whisper instead of gasp (#23425)

* Basics working

* The rest of the PR

* formatting suggestion

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Renames proc

* Darn merge conflicts

* Rename proc again

* this doesn't do anything

* I swear I commited this earlier. Grammar fix.

* Behold, the code compressor 9000!

Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com>

* Update code/modules/mob/living/carbon/human/human_say.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

---------

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
Daylight
2023-12-26 14:45:50 -05:00
committed by GitHub
co-authored by Luc Gaxeer DGamerL
parent 70346d2a65
commit 27722e4d7a
6 changed files with 12 additions and 6 deletions
@@ -69,13 +69,13 @@
return FALSE
if((breathes && !L) || breathes && L && (L.status & ORGAN_DEAD))
return FALSE
if(getOxyLoss() > 10 || AmountLoseBreath() >= 8 SECONDS)
emote("gasp")
return FALSE
if(mind)
return !mind.miming
return TRUE
/mob/living/carbon/human/cannot_speak_loudly()
return getOxyLoss() > 10 || AmountLoseBreath() >= 8 SECONDS
/mob/living/carbon/human/proc/SetSpecialVoice(new_voice)
if(new_voice)
special_voice = new_voice
+3
View File
@@ -182,6 +182,9 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key)
var/list/hsp = handle_speech_problems(message_pieces, verb)
verb = hsp["verb"]
if(cannot_speak_loudly())
return whisper(message)
// Do this so it gets logged for all types of communication
var/log_message = "[message_mode ? "([message_mode])" : ""] '[message]'"
create_log(SAY_LOG, log_message)
+3
View File
@@ -1326,6 +1326,9 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
/mob/proc/IsVocal()
return TRUE
/mob/proc/cannot_speak_loudly()
return FALSE
/mob/proc/get_access()
return list() //must return list or IGNORE_ACCESS