mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
Fixes forced say custom emotes properly. (#44328)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
client.dsay(message)
|
||||
return
|
||||
|
||||
if(check_emote(message))
|
||||
if(check_emote(message, forced))
|
||||
return
|
||||
|
||||
. = say_dead(message)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user