From 83b522e289cf81df6822d49f82508ba26d77743a Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Sat, 7 May 2016 10:29:32 -0400 Subject: [PATCH 1/2] Emotes work when not in lowercase --- code/modules/mob/living/carbon/alien/humanoid/emote.dm | 2 +- code/modules/mob/living/carbon/alien/larva/emote.dm | 2 +- code/modules/mob/living/carbon/brain/emote.dm | 1 + code/modules/mob/living/carbon/human/emote.dm | 1 + code/modules/mob/living/carbon/slime/emote.dm | 1 + code/modules/mob/living/silicon/emote.dm | 1 + code/modules/mob/living/silicon/robot/emote.dm | 1 + 7 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/alien/humanoid/emote.dm b/code/modules/mob/living/carbon/alien/humanoid/emote.dm index caf3cc4e5ad..c20cc155f37 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/emote.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/emote.dm @@ -8,7 +8,7 @@ // if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_' // act = copytext(act,1,length(act)) //seriously who the fuck wrote this var/muzzled = is_muzzled() - + act = lowertext(act) switch(act) if("sign") if(!restrained()) diff --git a/code/modules/mob/living/carbon/alien/larva/emote.dm b/code/modules/mob/living/carbon/alien/larva/emote.dm index b617a1fc883..dc7a66f7018 100644 --- a/code/modules/mob/living/carbon/alien/larva/emote.dm +++ b/code/modules/mob/living/carbon/alien/larva/emote.dm @@ -8,7 +8,7 @@ if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_' act = copytext(act,1,length(act)) var/muzzled = is_muzzled() - + act = lowertext(act) switch(act) if ("me") if(silent) diff --git a/code/modules/mob/living/carbon/brain/emote.dm b/code/modules/mob/living/carbon/brain/emote.dm index fd2a4879c9d..16cf01e4266 100644 --- a/code/modules/mob/living/carbon/brain/emote.dm +++ b/code/modules/mob/living/carbon/brain/emote.dm @@ -11,6 +11,7 @@ if(src.stat == DEAD) return + act = lowertext(act) switch(act) if ("alarm") diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 9f1b41b3ac5..70784b414fc 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -25,6 +25,7 @@ //Emote Cooldown System (it's so simple!) // proc/handle_emote_CD() located in [code\modules\mob\emote.dm] var/on_CD = 0 + act = lowertext(act) switch(act) //Cooldown-inducing emotes if("ping", "pings", "buzz", "buzzes", "beep", "beeps", "yes", "no") diff --git a/code/modules/mob/living/carbon/slime/emote.dm b/code/modules/mob/living/carbon/slime/emote.dm index 64838a1704d..8c290dc6094 100644 --- a/code/modules/mob/living/carbon/slime/emote.dm +++ b/code/modules/mob/living/carbon/slime/emote.dm @@ -7,6 +7,7 @@ if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_' act = copytext(act,1,length(act)) + act = lowertext(act) switch(act) //Alphabetical please if ("me") if(silent) diff --git a/code/modules/mob/living/silicon/emote.dm b/code/modules/mob/living/silicon/emote.dm index c5c3603466e..c70979c5947 100644 --- a/code/modules/mob/living/silicon/emote.dm +++ b/code/modules/mob/living/silicon/emote.dm @@ -8,6 +8,7 @@ //Emote Cooldown System (it's so simple!) // proc/handle_emote_CD() located in [code\modules\mob\emote.dm] var/on_CD = 0 + act = lowertext(act) switch(act) //Cooldown-inducing emotes if("scream", "screams") diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index 30273aec02c..36c61910e6d 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -8,6 +8,7 @@ //Emote Cooldown System (it's so simple!) // proc/handle_emote_CD() located in [code\modules\mob\emote.dm] var/on_CD = 0 + act = lowertext(act) switch(act) //Cooldown-inducing emotes if("law","flip","flips","halt") //halt is exempt because it's used to stop criminal scum //WHOEVER THOUGHT THAT WAS A GOOD IDEA IS GOING TO GET SHOT. From 67bee9ad5f5a9beee223d4ffbcad16a4a06a4c2c Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Mon, 9 May 2016 03:10:40 -0400 Subject: [PATCH 2/2] missing ones --- code/modules/mob/living/simple_animal/bot/emote.dm | 1 + .../mob/living/simple_animal/friendly/diona.dm | 11 ++++++----- .../modules/mob/living/simple_animal/simple_animal.dm | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/emote.dm b/code/modules/mob/living/simple_animal/bot/emote.dm index 4054e520ecf..0c8b591f069 100644 --- a/code/modules/mob/living/simple_animal/bot/emote.dm +++ b/code/modules/mob/living/simple_animal/bot/emote.dm @@ -11,6 +11,7 @@ //Emote Cooldown System (it's so simple!) // proc/handle_emote_CD() located in [code\modules\mob\emote.dm] var/on_CD = 0 + act = lowertext(act) switch(act) //Cooldown-inducing emotes if("scream", "screams") diff --git a/code/modules/mob/living/simple_animal/friendly/diona.dm b/code/modules/mob/living/simple_animal/friendly/diona.dm index 4606558d271..f62176ee926 100644 --- a/code/modules/mob/living/simple_animal/friendly/diona.dm +++ b/code/modules/mob/living/simple_animal/friendly/diona.dm @@ -250,18 +250,19 @@ return /mob/living/simple_animal/diona/emote(var/act, var/m_type=1, var/message = null) - if(stat) + if(stat) return - + var/on_CD = 0 + act = lowertext(act) switch(act) if("chirp") - on_CD = handle_emote_CD() + on_CD = handle_emote_CD() else - on_CD = 0 + on_CD = 0 if(on_CD == 1) - return + return switch(act) //IMPORTANT: Emotes MUST NOT CONFLICT anywhere along the chain. if("chirp") diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 23477c2fc18..1a1cb2b9972 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -269,8 +269,9 @@ return /mob/living/simple_animal/emote(var/act, var/m_type=1, var/message = null) - if(stat) return - + if(stat) + return + act = lowertext(act) switch(act) //IMPORTANT: Emotes MUST NOT CONFLICT anywhere along the chain. if("scream") message = "\The [src] whimpers."