Skip to content

Commit

Permalink
Fixes mobs in crit being able to understand other languages (#5342)
Browse files Browse the repository at this point in the history
# About the pull request

Fixes #3778 , mobs should no longer be able to comprehend other
languages while in crit.

# Explain why it's good for the game

bug bad

# Changelog

:cl:
fix: Fixes mobs being able to understand other languages while in crit. 
/:cl:
  • Loading branch information
Cthulhu80 committed Dec 31, 2023
1 parent f3113a0 commit 672be37
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions code/modules/mob/hear_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,21 @@

/mob/living/hear_say(message, verb, datum/language/language, alt_name, italics, mob/speaker, sound/speech_sound, sound_vol)
if(client && mind && stat == UNCONSCIOUS)
hear_sleep(src, message, src == speaker, Adjacent(speaker))
hear_sleep(speaker, message, src == speaker, Adjacent(speaker), language)
return
return ..()

/mob/living/hear_radio(message, verb, datum/language/language, part_a, part_b, mob/speaker, hard_to_hear, vname, command, no_paygrade)
if(client && mind && stat == UNCONSCIOUS)
hear_sleep(src, message, FALSE, FALSE)
hear_sleep(speaker, message, FALSE, FALSE, language)
return
return ..()

/mob/living/proc/hear_sleep(mob/speaker = null, message, hearing_self = FALSE, proximity_flag = FALSE)
/mob/living/proc/hear_sleep(mob/speaker = null, message, hearing_self = FALSE, proximity_flag = FALSE, datum/language/language = null)
var/heard = ""
var/clear_char_probability = 90
if(!say_understands(speaker, language))
clear_char_probability = 25

if(sdisabilities & DISABILITY_DEAF || ear_deaf)
if(speaker == src)
Expand All @@ -226,7 +229,7 @@
heard = SPAN_LOCALSAY("You mutter something about... [stars(message, clear_char_probability = 99)]")

else if(!sleeping && proximity_flag)
heard = SPAN_LOCALSAY("You hear someone near you say something... [stars(message, clear_char_probability = 90)]")
heard = SPAN_LOCALSAY("You hear someone near you say something... [stars(message, clear_char_probability)]")

else if(prob(15))

Expand Down

0 comments on commit 672be37

Please sign in to comment.