diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 382eb94b4db..a982cf0d5c7 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -97,7 +97,7 @@ if(!can_hear()) // INNATE is the flag for audible-emote-language, so we don't want to show an "x talks but you cannot hear them" message if it's set - // if(!language || !(language.flags & INNATE)) + // if(!language || !(language.flags & INNATE)) if(speaker == src) to_chat(src, "You cannot hear yourself speak!") else @@ -158,14 +158,16 @@ message = strip_html_properly(message) var/list/punctuation = list(",", "!", ".", ";", "?") var/list/messages = splittext(message, " ") - var/R = rand(1, messages.len) - var/heardword = messages[R] - if(copytext(heardword,1, 1) in punctuation) - heardword = copytext(heardword,2) - if(copytext(heardword,-1) in punctuation) - heardword = copytext(heardword,1,lentext(heardword)) - heard = "...You hear something about... '[heardword]'..." - + if(messages.len > 1) + var/R = rand(1, messages.len) + var/heardword = messages[R] + if(copytext(heardword,1, 1) in punctuation) + heardword = copytext(heardword,2) + if(copytext(heardword,-1) in punctuation) + heardword = copytext(heardword,1,lentext(heardword)) + heard = "...You hear something about... '[heardword]'..." + else + heard = "...You almost hear something......" else heard = "...You almost hear someone talking..."