From 52098915abdfe54d0207306a8a658546ce871c46 Mon Sep 17 00:00:00 2001 From: MisterLayne Date: Fri, 19 Jan 2018 17:23:05 -0500 Subject: [PATCH] Begone, nested for loops! --- code/modules/mob/hear_say.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index c2a7b5668a2..9c91ca63506 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -87,7 +87,9 @@ // Checks if the mob's own name is included inside message. Handles both first and last names. /mob/proc/check_mentioned(var/message) + var/not_included = list("a", "the", "of", "in", "for", "through", "throughout", "therefore", "here", "there", "then", "now", "I", "you", "they", "he", "she", "by") var/list/valid_names = splittext(real_name, " ") // Should output list("John", "Doe") as an example. + valid_names -= not_included var/list/nicknames = splittext(nickname, " ") valid_names += nicknames valid_names += special_mentions()