Fixes forced say custom emotes properly. (#44328)

This commit is contained in:
AnturK
2019-06-09 18:15:39 -04:00
committed by moo
parent 5c1b649d24
commit 33dbe68452
5 changed files with 11 additions and 8 deletions
@@ -75,7 +75,5 @@
/obj/item/clothing/gloves/rapid/attack_self(mob/user)
var/input = stripped_input(user,"What do you want your battlecry to be? Max length of 6 characters.", ,"", 7)
if(input == "*me") //If they try to do a *me emote it will stop the attack to prompt them for an emote then they can walk away and enter the emote for a punch from far away
to_chat(user, "Invalid battlecry, please use another.")
else if(input)
if(input)
warcry = input
+1 -1
View File
@@ -15,7 +15,7 @@
client.dsay(message)
return
if(check_emote(message))
if(check_emote(message, forced))
return
. = say_dead(message)
+6 -1
View File
@@ -399,6 +399,9 @@
key_third_person = "custom"
message = null
/datum/emote/living/custom/can_run_emote(mob/user, status_check, intentional)
. = ..() && intentional
/datum/emote/living/custom/proc/check_invalid(mob/user, input)
. = TRUE
if(copytext(input,1,5) == "says")
@@ -412,7 +415,9 @@
else
. = FALSE
/datum/emote/living/custom/run_emote(mob/user, params, type_override = null)
/datum/emote/living/custom/run_emote(mob/user, params, type_override = null, intentional = FALSE)
if(!can_run_emote(user, TRUE, intentional))
return FALSE
if(is_banned_from(user.ckey, "Emote"))
to_chat(user, "You cannot send custom emotes (banned).")
return FALSE
+1 -1
View File
@@ -119,7 +119,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
say_dead(original_message)
return
if(check_emote(original_message) || !can_speak_basic(original_message, ignore_spam))
if(check_emote(original_message, forced) || !can_speak_basic(original_message, ignore_spam))
return
if(in_critical)
+2 -2
View File
@@ -74,9 +74,9 @@
log_talk(message, LOG_SAY, tag="DEAD")
deadchat_broadcast(rendered, follow_target = src, speaker_key = key)
/mob/proc/check_emote(message)
/mob/proc/check_emote(message, forced)
if(copytext(message, 1, 2) == "*")
emote(copytext(message, 2), intentional = TRUE)
emote(copytext(message, 2), intentional = !forced)
return 1
/mob/proc/hivecheck()