From e61d774a7c8794ec38bf938d56d91b3cf9afe020 Mon Sep 17 00:00:00 2001 From: VampyrBytes Date: Sun, 8 May 2016 05:34:31 +0100 Subject: [PATCH] Makes emotes case insensitive (#4386) Also prevents unconscious emoting --- code/datums/Emote_system/emote.dm | 2 ++ code/datums/Emote_system/emote_handler.dm | 2 +- code/modules/mob/say.dm | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/datums/Emote_system/emote.dm b/code/datums/Emote_system/emote.dm index f0a7e6ddb1b..75c8314ce7a 100644 --- a/code/datums/Emote_system/emote.dm +++ b/code/datums/Emote_system/emote.dm @@ -103,6 +103,8 @@ VampyrBytes /datum/emote/proc/prevented(var/mob/user) if(user.stat == DEAD) return "you are dead" + if(user.stat == UNCONSCIOUS) + return "you are unconscious" if(restrained && user.restrained()) return "you are restrained" diff --git a/code/datums/Emote_system/emote_handler.dm b/code/datums/Emote_system/emote_handler.dm index a20199155d2..ef4441857e5 100644 --- a/code/datums/Emote_system/emote_handler.dm +++ b/code/datums/Emote_system/emote_handler.dm @@ -16,7 +16,7 @@ var/datum/emote/found = searchTree(emote) if(found) for(var/command in found.commands) - commands[command] = found + commands[lowertext(command)] = found found.addVerbs(owner) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 709c1d778b3..8078a101861 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -96,6 +96,7 @@ /mob/proc/emote(var/act, var/type, var/message) + act = lowertext(act) emoteHandler.runEmote(act, message, type)