Merge pull request #3759 from Citadel-Station-13/upstream-merge-32303

[MIRROR] Spamming runes / battlecries / etc will no longer trigger spam prevention
This commit is contained in:
LetterJay
2017-11-03 00:12:12 -05:00
committed by GitHub
4 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -69,7 +69,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
"÷" = "cords"
))
/mob/living/say(message, bubble_type,var/list/spans = list(), sanitize = TRUE, datum/language/language = null)
/mob/living/say(message, bubble_type,var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE)
var/static/list/crit_allowed_modes = list(MODE_WHISPER = TRUE, MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
var/static/list/unconscious_allowed_modes = list(MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
@@ -105,7 +105,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
say_dead(original_message)
return
if(check_emote(original_message) || !can_speak_basic(original_message))
if(check_emote(original_message) || !can_speak_basic(original_message, ignore_spam))
return
if(in_critical)
@@ -270,12 +270,12 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
if(can_speak_basic(message) && can_speak_vocal(message))
return 1
/mob/living/proc/can_speak_basic(message) //Check BEFORE handling of xeno and ling channels
/mob/living/proc/can_speak_basic(message, ignore_spam = FALSE) //Check BEFORE handling of xeno and ling channels
if(client)
if(client.prefs.muted & MUTE_IC)
to_chat(src, "<span class='danger'>You cannot speak in IC (muted).</span>")
return 0
if(client.handle_spam_prevention(message,MUTE_IC))
if(!ignore_spam && client.handle_spam_prevention(message,MUTE_IC))
return 0
return 1
@@ -24,7 +24,7 @@
/mob/living/simple_animal/hostile/guardian/punch/AttackingTarget()
. = ..()
if(isliving(target))
src.say("[src.battlecry][src.battlecry][src.battlecry][src.battlecry][src.battlecry][src.battlecry][src.battlecry][src.battlecry][src.battlecry][src.battlecry]!!")
say("[battlecry][battlecry][battlecry][battlecry][battlecry][battlecry][battlecry][battlecry][battlecry][battlecry]!!", ignore_spam = TRUE)
playsound(loc, src.attack_sound, 50, 1, 1)
playsound(loc, src.attack_sound, 50, 1, 1)
playsound(loc, src.attack_sound, 50, 1, 1)