mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
[MIRROR] Allows ghosts to start messages with asterisks in deadchat again (#3644)
* Allows ghosts to start messages with asterisks in deadchat again (#57159) #56519 had noble goals in trying to make emote code more robust for ghosts, but in doing so it undid #47144, which was made to allow people to start messages with asterisks in deadchat without getting hassled by the game thinking you're emoting. This re-limits the emote checker to the only two emotes ghosts have ever had, *spin and *flip. * Allows ghosts to start messages with asterisks in deadchat again Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
This commit is contained in:
@@ -23,5 +23,5 @@
|
||||
/mob/camera/canUseStorage()
|
||||
return FALSE
|
||||
|
||||
/mob/camera/emote(act, m_type=1, message = null, intentional = FALSE)
|
||||
/mob/camera/emote(act, m_type=1, message = null, intentional = FALSE, force_silence = FALSE)
|
||||
return FALSE
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
/mob/dead/observer/check_emote(message, forced)
|
||||
if(message[1] == "*")
|
||||
emote(copytext(message, length(message[1]) + 1), intentional = !forced)
|
||||
return TRUE
|
||||
|
||||
return emote(copytext(message, length(message[1]) + 1), intentional = !forced, force_silence = TRUE)
|
||||
|
||||
//Modified version of get_message_mods, removes the trimming, the only thing we care about here is admin channels
|
||||
/mob/dead/observer/get_message_mods(message, list/mods)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#define BEYBLADE_CONFUSION_LIMIT 40 //A max for how penalized a carbon will be for beyblading
|
||||
|
||||
//The code execution of the emote datum is located at code/datums/emotes.dm
|
||||
/mob/proc/emote(act, m_type = null, message = null, intentional = FALSE)
|
||||
/mob/proc/emote(act, m_type = null, message = null, intentional = FALSE, force_silence = FALSE)
|
||||
act = lowertext(act)
|
||||
var/param = message
|
||||
var/custom_param = findchar(act, " ")
|
||||
@@ -17,7 +17,7 @@
|
||||
var/list/key_emotes = GLOB.emote_list[act]
|
||||
|
||||
if(!length(key_emotes))
|
||||
if(intentional)
|
||||
if(intentional && !force_silence)
|
||||
to_chat(src, "<span class='notice'>'[act]' emote does not exist. Say *help for a list.</span>")
|
||||
return FALSE
|
||||
var/silenced = FALSE
|
||||
@@ -28,7 +28,7 @@
|
||||
if(P.run_emote(src, param, m_type, intentional))
|
||||
SEND_SIGNAL(src, COMSIG_MOB_EMOTE, P, act, m_type, message, intentional)
|
||||
return TRUE
|
||||
if(intentional && !silenced)
|
||||
if(intentional && !silenced && !force_silence)
|
||||
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -457,7 +457,7 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/emote(act, m_type=1, message = null, intentional = FALSE)
|
||||
/mob/living/simple_animal/emote(act, m_type=1, message = null, intentional = FALSE, force_silence = FALSE)
|
||||
if(stat)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user