From 8d99c8c689bfacea4b891cdd0ae7989a28efb9ab Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 30 Sep 2015 03:04:15 +0200 Subject: [PATCH 1/3] Add cooldown to chirp emote --- code/modules/mob/living/carbon/human/emote.dm | 3 --- .../mob/living/simple_animal/friendly/diona.dm | 13 ++++++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 95e60ade252..7c313c92057 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -17,8 +17,6 @@ if (I.implanted) I.trigger(act, src) - - //Emote Cooldown System (it's so simple!) // proc/handle_emote_CD() located in [code\modules\mob\emote.dm] var/on_CD = 0 @@ -42,7 +40,6 @@ if(on_CD == 1) // Check if we need to suppress the emote attempt. return // Suppress emote, you're still cooling off. - //--FalseIncarnate switch(act) if("me") //OKAY SO RANT TIME, THIS FUCKING HAS TO BE HERE OR A SHITLOAD OF THINGS BREAK diff --git a/code/modules/mob/living/simple_animal/friendly/diona.dm b/code/modules/mob/living/simple_animal/friendly/diona.dm index f4d1dc0ffc2..95caf726186 100644 --- a/code/modules/mob/living/simple_animal/friendly/diona.dm +++ b/code/modules/mob/living/simple_animal/friendly/diona.dm @@ -249,7 +249,18 @@ return /mob/living/simple_animal/diona/emote(var/act, var/m_type=1, var/message = null) - if(stat) return + if(stat) + return + + var/on_CD = 0 + switch(act) + if("chirp") + on_CD = handle_emote_CD() + else + on_CD = 0 + + if(on_CD == 1) + return switch(act) //IMPORTANT: Emotes MUST NOT CONFLICT anywhere along the chain. if("chirp") From 9277a2f55e52b18678fa99299b19eaf70b28bcde Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 30 Sep 2015 03:35:30 +0200 Subject: [PATCH 2/3] Dsay fix --- code/modules/admin/verbs/deadsay.dm | 12 +++++++----- code/modules/mob/mob_helpers.dm | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 22d6d4b2a7a..7c058c8d7ca 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -2,20 +2,22 @@ set category = "Special Verbs" set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite set hidden = 1 - if(!src.holder) - src << "Only administrators may use this command." + + if(!check_rights(R_ADMIN|RMOD)) return + if(!src.mob) return + if(prefs.muted & MUTE_DEADCHAT) - src << "\red You cannot send DSAY messages (muted)." + src << "You cannot send DSAY messages (muted)." return if(!(prefs.toggles & CHAT_DEAD)) - src << "\red You have deadchat muted." + src << "You have deadchat muted." return - if (src.handle_spam_prevention(msg,MUTE_DEADCHAT)) + if (handle_spam_prevention(msg,MUTE_DEADCHAT)) return var/stafftype = null diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 7e0fbb1389f..9a5ce12d904 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -505,13 +505,13 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HARM) name = realname for(var/mob/M in player_list) - if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || check_rights(R_MOD,0,M)) && (M.client.prefs.toggles & CHAT_DEAD)) + if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || check_rights(R_ADMIN|R_MOD,0,M)) && (M.client.prefs.toggles & CHAT_DEAD)) var/follow var/lname if(subject) if(subject != M) follow = "([ghost_follow_link(subject, ghost=M)]) " - if(M.stat != DEAD && M.client.holder) + if(M.stat != DEAD && check_rights(R_ADMIN|R_MOD,0,M)) follow = "([admin_jump_link(subject, M.client.holder)]) " var/mob/dead/observer/DM if(istype(subject, /mob/dead/observer)) From 1a7c56548267ed955e578fdea0ab587fd5a9da12 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 30 Sep 2015 03:38:44 +0200 Subject: [PATCH 3/3] Fix --- code/modules/admin/verbs/deadsay.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 7c058c8d7ca..b448099f635 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -3,7 +3,7 @@ set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite set hidden = 1 - if(!check_rights(R_ADMIN|RMOD)) + if(!check_rights(R_ADMIN|R_MOD)) return if(!src.mob)