diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm
index 6b9266718f..a414c138e3 100644
--- a/code/datums/diseases/appendicitis.dm
+++ b/code/datums/diseases/appendicitis.dm
@@ -28,18 +28,18 @@
A.inflamed = TRUE
if(prob(3))
to_chat(affected_mob, span_warning("You feel a stabbing pain in your abdomen!"))
- affected_mob.custom_emote(VISIBLE_MESSAGE, "winces painfully.")
+ affected_mob.automatic_custom_emote(VISIBLE_MESSAGE, "winces painfully.", check_stat = TRUE)
affected_mob.Stun(rand(4, 6))
affected_mob.adjustToxLoss(1)
if(3)
if(prob(1))
to_chat(affected_mob, span_danger("Your abdomen is a world of pain!"))
- affected_mob.custom_emote(VISIBLE_MESSAGE, "winces painfully.")
+ affected_mob.automatic_custom_emote(VISIBLE_MESSAGE, "winces painfully.", check_stat = TRUE)
affected_mob.Weaken(10)
if(prob(1))
affected_mob.vomit(95)
if(prob(5))
to_chat(affected_mob, span_warning("You feel a stabbing pain in your abdomen!"))
- affected_mob.custom_emote(VISIBLE_MESSAGE, "winces painfully.")
+ affected_mob.automatic_custom_emote(VISIBLE_MESSAGE, "winces painfully.", check_stat = TRUE)
affected_mob.Stun(rand(4, 6))
affected_mob.adjustToxLoss(2)
diff --git a/code/modules/blob2/overmind/overmind.dm b/code/modules/blob2/overmind/overmind.dm
index 6db90f7e94..7c9c67d65d 100644
--- a/code/modules/blob2/overmind/overmind.dm
+++ b/code/modules/blob2/overmind/overmind.dm
@@ -146,7 +146,7 @@ var/list/overminds = list()
//Handle nonverbal languages here
for(var/datum/multilingual_say_piece/S in message_pieces)
if(S.speaking.flags & NONVERBAL)
- custom_emote(1, "[pick(S.speaking.signlang_verb)].")
+ custom_emote(VISIBLE_MESSAGE, "[pick(S.speaking.signlang_verb)].")
for(var/mob/M in listening)
spawn()
diff --git a/code/modules/emotes/custom_emote.dm b/code/modules/emotes/custom_emote.dm
new file mode 100644
index 0000000000..933423f77a
--- /dev/null
+++ b/code/modules/emotes/custom_emote.dm
@@ -0,0 +1,87 @@
+
+/// This is the custom_emote that you'll want to use if you want the mob to be able to input their emote.
+/mob/proc/custom_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/range = world.view, var/check_stat = TRUE)
+
+ if((check_stat && (src && stat)) || (!use_me && usr == src))
+ to_chat(src, "You are unable to emote.")
+ return
+
+ var/input
+ if(!message)
+ input = sanitize(tgui_input_text(src,"Choose an emote to display."))
+ else
+ input = message
+ process_emote(m_type, message, input, range)
+
+/// This is the custom_emote that you'll want to use if you're forcing something to custom emote with no input from the mob.
+/// By default, we have a visible message, our range is world.view, and we do NOT check the stat.
+/mob/proc/automatic_custom_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/range = world.view, var/check_stat = FALSE)
+ if(check_stat && (src && stat))
+ return
+ var/input = message
+ process_emote(m_type, message, input, range)
+
+//The actual meat and potatoes of the emote processing.
+/mob/proc/process_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/input, var/range = world.view)
+ var/list/formatted
+ var/runemessage
+ if(input)
+ formatted = format_emote(src, message)
+ if(!islist(formatted))
+ return
+ message = formatted["pretext"] + formatted["nametext"] + formatted["subtext"]
+ runemessage = formatted["subtext"]
+ // This is just personal preference (but I'm objectively right) that custom emotes shouldn't have periods at the end in runechat
+ runemessage = replacetext(runemessage,".","",length(runemessage),length(runemessage)+1)
+ else
+ return
+
+ if(input)
+ log_emote(message,src) //Log before we add junk
+ if(client)
+ message = span_emote(span_bold("[src]") + " [input]")
+ else
+ message = span_npc_emote(span_bold("[src]") + " [input]")
+ else
+ return
+
+ if(message)
+ message = encode_html_emphasis(message)
+
+ /* CHOMPRemove - Not needed if you set your defaults right
+ var/ourfreq = null
+ if(isliving(src))
+ var/mob/living/L = src
+ if(L.voice_freq > 0 )
+ ourfreq = L.voice_freq
+ */
+
+ // Hearing gasp and such every five seconds is not good emotes were not global for a reason.
+ // Maybe some people are okay with that.
+ var/turf/T = get_turf(src)
+
+ if(!T) return
+
+ if(client)
+ playsound(T, pick(emote_sound), 25, TRUE, falloff = 1 , is_global = TRUE, frequency = voice_freq, ignore_walls = FALSE, preference = /datum/preference/toggle/emote_sounds)
+
+ var/list/in_range = get_mobs_and_objs_in_view_fast(T,range,2,remote_ghosts = client ? TRUE : FALSE)
+ var/list/m_viewers = in_range["mobs"]
+ var/list/o_viewers = in_range["objs"]
+
+ for(var/mob/M as anything in m_viewers)
+ if(M)
+ if(isobserver(M))
+ message = span_emote(span_bold("[src]") + " ([ghost_follow_link(src, M)]) [input]")
+ if(src.client && M && !(get_z(src) == get_z(M)))
+ message = span_multizsay("[message]")
+ // If you are in the same tile, right next to, or being held by a person doing an emote, you should be able to see it while blind
+ if(m_type != AUDIBLE_MESSAGE && (src.Adjacent(M) || (istype(src.loc, /obj/item/holder) && src.loc.loc == M)))
+ M.show_message(message)
+ else
+ M.show_message(message, m_type)
+ M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE))
+
+ for(var/obj/O as anything in o_viewers)
+ if(O)
+ O.see_emote(src, message, m_type)
diff --git a/code/modules/emotes/emote_mob.dm b/code/modules/emotes/emote_mob.dm
index a944e9c11b..d48f0bd089 100644
--- a/code/modules/emotes/emote_mob.dm
+++ b/code/modules/emotes/emote_mob.dm
@@ -161,85 +161,6 @@
nametext = span_bold("[emoter]")
return list("pretext" = pretext, "nametext" = nametext, "subtext" = subtext)
-/mob/proc/custom_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/range = world.view)
-
- if((usr && stat) || (!use_me && usr == src))
- to_chat(src, "You are unable to emote.")
- return
-
- var/input
- if(!message)
- input = sanitize(tgui_input_text(src,"Choose an emote to display."))
- else
- input = message
-
- var/list/formatted
- var/runemessage
- if(input)
- formatted = format_emote(src, message)
- if(!islist(formatted))
- return
- message = formatted["pretext"] + formatted["nametext"] + formatted["subtext"]
- runemessage = formatted["subtext"]
- // This is just personal preference (but I'm objectively right) that custom emotes shouldn't have periods at the end in runechat
- runemessage = replacetext(runemessage,".","",length(runemessage),length(runemessage)+1)
- else
- return
-
- if(input)
- log_emote(message,src) //Log before we add junk
- if(usr && usr.client)
- message = span_emote(span_bold("[src]") + " [input]")
- else
- message = span_npc_emote(span_bold("[src]") + " [input]")
- else
- return
-
- if(message)
- message = encode_html_emphasis(message)
-
- /* CHOMPRemove - Not needed if you set your defaults right
- var/ourfreq = null
- if(isliving(src))
- var/mob/living/L = src
- if(L.voice_freq > 0 )
- ourfreq = L.voice_freq
- */
-
-
- // Hearing gasp and such every five seconds is not good emotes were not global for a reason.
- // Maybe some people are okay with that.
- var/turf/T = get_turf(src)
-
- if(!T) return
-
- if(client)
- playsound(T, pick(voice_sounds_list), 75, TRUE, falloff = 1 , is_global = TRUE, frequency = voice_freq, ignore_walls = TRUE, preference = /datum/preference/toggle/emote_sounds) //CHOMPEdit - use say prefs instead //ChompEDIT - also ignore walls
- var/list/in_range = get_mobs_and_objs_in_view_fast(T,range,2,remote_ghosts = client ? TRUE : FALSE)
- var/list/m_viewers = in_range["mobs"]
- var/list/o_viewers = in_range["objs"]
-
- for(var/mob/M as anything in m_viewers)
- spawn(0) // It's possible that it could be deleted in the meantime, or that it runtimes.
- if(M)
- if(isobserver(M))
- message = span_emote(span_bold("[src]") + " ([ghost_follow_link(src, M)]) [input]")
- if(usr && usr.client && M && !(get_z(usr) == get_z(M)))
- message = span_multizsay("[message]")
- // If you are in the same tile, right next to, or being held by a person doing an emote, you should be able to see it while blind
- if(m_type != AUDIBLE_MESSAGE && (src.Adjacent(M) || (istype(src.loc, /obj/item/holder) && src.loc.loc == M)))
- M.show_message(message)
- else
- M.show_message(message, m_type)
- M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE))
-
- for(var/obj/O as anything in o_viewers)
- spawn(0)
- if(O)
- O.see_emote(src, message, m_type)
-
-
-
// Specific mob type exceptions below.
/mob/living/silicon/ai/emote(var/act, var/type, var/message)
var/obj/machinery/hologram/holopad/T = src.holo
diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm
index 1c0011e0c6..2066a6d95b 100644
--- a/code/modules/food/food/snacks.dm
+++ b/code/modules/food/food/snacks.dm
@@ -475,7 +475,7 @@
reagents.trans_to_mob(user, bitesize, CHEM_INGEST)
spawn(5)
if(!src && !user.client)
- user.custom_emote(1,"[pick("burps", "cries for more", "burps twice", "looks at the area where the food was")]")
+ user.automatic_custom_emote(VISIBLE_MESSAGE,"[pick("burps", "cries for more", "burps twice", "looks at the area where the food was")]", check_stat = TRUE)
qdel(src)
On_Consume(user)
diff --git a/code/modules/genetics/side_effects.dm b/code/modules/genetics/side_effects.dm
index 286b96927c..44c6ea5c94 100644
--- a/code/modules/genetics/side_effects.dm
+++ b/code/modules/genetics/side_effects.dm
@@ -36,7 +36,7 @@
/datum/genetics/side_effect/genetic_burn/start(mob/living/carbon/human/H)
..()
- H.custom_emote(VISIBLE_MESSAGE, "starts turning very red..")
+ H.automatic_custom_emote(VISIBLE_MESSAGE, "starts turning very red..", check_stat = TRUE)
/datum/genetics/side_effect/genetic_burn/finish(datum/weakref/WR)
if(..()) return
@@ -52,7 +52,7 @@
/datum/genetics/side_effect/bone_snap/start(mob/living/carbon/human/H)
..()
- H.custom_emote(VISIBLE_MESSAGE, "'s limbs start shivering uncontrollably.")
+ H.automatic_custom_emote(VISIBLE_MESSAGE, "'s limbs start shivering uncontrollably.", check_stat = TRUE)
/datum/genetics/side_effect/bone_snap/finish(datum/weakref/WR)
if(..()) return
@@ -70,7 +70,7 @@
/datum/genetics/side_effect/confuse/start(mob/living/carbon/human/H)
..()
var/datum/gender/T = gender_datums[H.get_visible_gender()]
- H.custom_emote(VISIBLE_MESSAGE, "has drool running down from [T.his] mouth.")
+ H.automatic_custom_emote(VISIBLE_MESSAGE, "has drool running down from [T.his] mouth.", check_stat = TRUE)
/datum/genetics/side_effect/confuse/finish(datum/weakref/WR)
if(..()) return
diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm
index 86f0166914..ba5098e192 100644
--- a/code/modules/mob/living/bot/cleanbot.dm
+++ b/code/modules/mob/living/bot/cleanbot.dm
@@ -30,7 +30,7 @@
/mob/living/bot/cleanbot/handleIdle()
if(!wet_floors && !spray_blood && vocal && prob(2))
- custom_emote(2, "makes an excited booping sound!")
+ automatic_custom_emote(AUDIBLE_MESSAGE, "makes an excited booping sound!")
playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
if(wet_floors && prob(5)) // Make a mess
@@ -119,7 +119,7 @@
if(istype(D, /obj/effect/decal/cleanable))
cleantime = istype(D, /obj/effect/decal/cleanable/dirt) ? 10 : 50
if(prob(20))
- custom_emote(2, "begins to clean up \the [D]")
+ automatic_custom_emote(AUDIBLE_MESSAGE, "begins to clean up \the [D]")
if(do_after(src, cleantime * cTimeMult))
if(istype(loc, /turf/simulated))
var/turf/simulated/f = loc
@@ -138,7 +138,7 @@
cleantime += 50
if(cleantime != 0)
if(prob(20))
- custom_emote(2, "begins to clean up \the [loc]")
+ automatic_custom_emote(AUDIBLE_MESSAGE, "begins to clean up \the [loc]")
if(do_after(src, cleantime * cTimeMult))
if(blood)
clean_blood()
diff --git a/code/modules/mob/living/bot/edCLNbot.dm b/code/modules/mob/living/bot/edCLNbot.dm
index 1aaeb0bbe4..877f0f516a 100644
--- a/code/modules/mob/living/bot/edCLNbot.dm
+++ b/code/modules/mob/living/bot/edCLNbot.dm
@@ -27,7 +27,7 @@
/mob/living/bot/cleanbot/edCLN/handleIdle()
if(vocal && prob(10))
- custom_emote(2, "makes a less than thrilled beeping sound.")
+ automatic_custom_emote(AUDIBLE_MESSAGE, "makes a less than thrilled beeping sound.")
playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
if(red_switch && !blue_switch && !green_switch && prob(10) || src.emagged)
diff --git a/code/modules/mob/living/bot/floorbot.dm b/code/modules/mob/living/bot/floorbot.dm
index 918fc30134..424a698737 100644
--- a/code/modules/mob/living/bot/floorbot.dm
+++ b/code/modules/mob/living/bot/floorbot.dm
@@ -113,7 +113,7 @@
addTiles(1)
if(vocal && prob(1))
- custom_emote(2, "makes an excited beeping sound!")
+ automatic_custom_emote(AUDIBLE_MESSAGE, "makes an excited beeping sound!")
playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
/mob/living/bot/floorbot/handleAdjacentTarget()
diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm
index ef2d835cbf..225e7c3521 100644
--- a/code/modules/mob/living/bot/medbot.dm
+++ b/code/modules/mob/living/bot/medbot.dm
@@ -123,7 +123,7 @@
var/message = pick(message_options)
say(message)
playsound(src, message_options[message], 50, 0)
- custom_emote(1, "points at [H.name].")
+ automatic_custom_emote(VISIBLE_MESSAGE, "points at [H.name].")
last_newpatient_speak = world.time
break
diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm
index 66c8c4ea73..9bf35ff457 100644
--- a/code/modules/mob/living/bot/mulebot.dm
+++ b/code/modules/mob/living/bot/mulebot.dm
@@ -188,13 +188,13 @@
update_icons()
/mob/living/bot/mulebot/handleFrustrated(has_target)
- custom_emote(2, "makes a sighing buzz.")
+ automatic_custom_emote(AUDIBLE_MESSAGE, "makes a sighing buzz.")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
..()
/mob/living/bot/mulebot/handleAdjacentTarget()
if(target == src.loc)
- custom_emote(2, "makes a chiming sound.")
+ automatic_custom_emote(AUDIBLE_MESSAGE, "makes a chiming sound.")
playsound(src, 'sound/machines/chime.ogg', 50, 0)
UnarmedAttack(target)
resetTarget()
@@ -283,7 +283,7 @@
return
if(crates_only && !istype(C,/obj/structure/closet/crate))
- custom_emote(2, "makes a sighing buzz.")
+ automatic_custom_emote(AUDIBLE_MESSAGE, "makes a sighing buzz.")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
return
diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm
index c9362a7a15..c7499c4c71 100644
--- a/code/modules/mob/living/bot/secbot.dm
+++ b/code/modules/mob/living/bot/secbot.dm
@@ -251,7 +251,7 @@
target = M
awaiting_surrender = 0
say("Level [threat] infraction alert!")
- custom_emote(1, "points at [M.name]!")
+ automatic_custom_emote(VISIBLE_MESSAGE, "points at [M.name]!")
playsound(src, pick(threat_found_sounds), 50)
return
diff --git a/code/modules/mob/living/carbon/human/MedicalSideEffects.dm b/code/modules/mob/living/carbon/human/MedicalSideEffects.dm
index b3537fc728..59c9795a44 100644
--- a/code/modules/mob/living/carbon/human/MedicalSideEffects.dm
+++ b/code/modules/mob/living/carbon/human/MedicalSideEffects.dm
@@ -127,7 +127,7 @@
if(11 to 30)
H.custom_pain("The muscles in your body cramp up painfully.",0)
if(31 to INFINITY)
- H.custom_emote(VISIBLE_MESSAGE, "flinches as all the muscles in their body cramp up.")
+ H.automatic_custom_emote(VISIBLE_MESSAGE, "flinches as all the muscles in their body cramp up.", check_stat = TRUE)
H.custom_pain("There's pain all over your body.",1)
// ITCH
@@ -145,5 +145,5 @@
if(11 to 30)
H.custom_pain("You want to scratch your itch badly.",0)
if(31 to INFINITY)
- H.custom_emote(VISIBLE_MESSAGE, "shivers slightly.")
+ H.automatic_custom_emote(VISIBLE_MESSAGE, "shivers slightly.", check_stat = TRUE)
H.custom_pain("This itch makes it really hard to concentrate.",1)
diff --git a/code/modules/mob/living/carbon/human/chem_side_effects.dm b/code/modules/mob/living/carbon/human/chem_side_effects.dm
index b3537fc728..59c9795a44 100644
--- a/code/modules/mob/living/carbon/human/chem_side_effects.dm
+++ b/code/modules/mob/living/carbon/human/chem_side_effects.dm
@@ -127,7 +127,7 @@
if(11 to 30)
H.custom_pain("The muscles in your body cramp up painfully.",0)
if(31 to INFINITY)
- H.custom_emote(VISIBLE_MESSAGE, "flinches as all the muscles in their body cramp up.")
+ H.automatic_custom_emote(VISIBLE_MESSAGE, "flinches as all the muscles in their body cramp up.", check_stat = TRUE)
H.custom_pain("There's pain all over your body.",1)
// ITCH
@@ -145,5 +145,5 @@
if(11 to 30)
H.custom_pain("You want to scratch your itch badly.",0)
if(31 to INFINITY)
- H.custom_emote(VISIBLE_MESSAGE, "shivers slightly.")
+ H.automatic_custom_emote(VISIBLE_MESSAGE, "shivers slightly.", check_stat = TRUE)
H.custom_pain("This itch makes it really hard to concentrate.",1)
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 6ba7a3b0a0..6a45b8884d 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -82,10 +82,10 @@ emp_act
drop_from_inventory(c_hand)
if(!isbelly(loc)) //VOREStation Add
if (affected.robotic >= ORGAN_ROBOT)
- custom_emote(VISIBLE_MESSAGE, "drops what they were holding, their [affected.name] malfunctioning!")
+ automatic_custom_emote(VISIBLE_MESSAGE, "drops what they were holding, their [affected.name] malfunctioning!", check_stat = TRUE)
else
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
- custom_emote(VISIBLE_MESSAGE, "[affected.organ_can_feel_pain() ? "" : emote_scream] drops what they were holding in their [affected.name]!")
+ automatic_custom_emote(VISIBLE_MESSAGE, "[affected.organ_can_feel_pain() ? "" : emote_scream] drops what they were holding in their [affected.name]!", check_stat = TRUE)
..(stun_amount, agony_amount, def_zone)
diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm
index 710ca0fbfa..44bb64f006 100644
--- a/code/modules/mob/living/carbon/human/human_organs.dm
+++ b/code/modules/mob/living/carbon/human/human_organs.dm
@@ -110,7 +110,7 @@
if(!(lying || resting) && !isbelly(loc))
if(limb_pain)
emote("scream")
- custom_emote(1, "collapses!")
+ automatic_custom_emote(VISIBLE_MESSAGE, "collapses!", check_stat = TRUE)
if(!(lying || resting)) // stops permastun with SPINE sdisability
Weaken(5) //can't emote while weakened, apparently.
@@ -156,7 +156,7 @@
if(!isbelly(loc))
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
- custom_emote(VISIBLE_MESSAGE, "[(can_feel_pain()) ? "" : emote_scream ]drops what they were holding in their [E.name]!")
+ automatic_custom_emote(VISIBLE_MESSAGE, "[(can_feel_pain()) ? "" : emote_scream ]drops what they were holding in their [E.name]!", check_stat = TRUE)
if(can_feel_pain())
emote("pain")
@@ -172,7 +172,7 @@
drop_from_inventory(r_hand)
if(!isbelly(loc))
- custom_emote(VISIBLE_MESSAGE, "drops what they were holding, their [E.name] malfunctioning!")
+ automatic_custom_emote(VISIBLE_MESSAGE, "drops what they were holding, their [E.name] malfunctioning!", check_stat = TRUE)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 5ba98e1ee1..09432b642c 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -196,7 +196,7 @@
if(dna)
if(disabilities & DETERIORATE && prob(2) && prob(3)) // stacked percents for rarity
// random strange symptoms from organ/limb
- custom_emote(VISIBLE_MESSAGE, "flinches slightly.")
+ automatic_custom_emote(VISIBLE_MESSAGE, "flinches slightly.", check_stat = TRUE)
switch(rand(1,4))
if(1)
adjustToxLoss(rand(2,8))
@@ -1963,7 +1963,7 @@
if(shock_stage >= 30)
if(shock_stage == 30 && !isbelly(loc))
- custom_emote(VISIBLE_MESSAGE, "is having trouble keeping their eyes open.")
+ automatic_custom_emote(VISIBLE_MESSAGE, "is having trouble keeping their eyes open.", check_stat = TRUE)
eye_blurry = max(2, eye_blurry)
if(traumatic_shock >= 80)
stuttering = max(stuttering, 5)
@@ -1975,7 +1975,7 @@
if (shock_stage >= 60)
if(shock_stage == 60 && !isbelly(loc))
- custom_emote(VISIBLE_MESSAGE, "'s body becomes limp.")
+ automatic_custom_emote(VISIBLE_MESSAGE, "'s body becomes limp.", check_stat = TRUE)
if (prob(2))
if(traumatic_shock >= 80)
to_chat(src, span_danger("[pick("The pain is excruciating", "Please, just end the pain", "Your whole body is going numb")]!"))
@@ -1999,7 +1999,7 @@
if(shock_stage == 150)
if(!isbelly(loc))
- custom_emote(VISIBLE_MESSAGE, "can no longer stand, collapsing!")
+ automatic_custom_emote(VISIBLE_MESSAGE, "can no longer stand, collapsing!", check_stat = TRUE)
if(prob(60))
emote("pain")
Weaken(20)
diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
index e240fd344c..3336d0c9be 100644
--- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
+++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
@@ -168,7 +168,7 @@
phaseanim.adjust_scale(src.size_multiplier, src.size_multiplier)
phaseanim.dir = dir
alpha = 0
- INVOKE_ASYNC(src, PROC_REF(custom_emote),1,"phases in!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"phases in!")
addtimer(CALLBACK(src, PROC_REF(shadekin_complete_phase_in), original_canmove), 5, TIMER_DELETE_ME)
@@ -254,7 +254,7 @@
ability_flags |= AB_PHASE_SHIFTED
ability_flags |= AB_PHASE_SHIFTING
throwpass = TRUE
- custom_emote(1,"phases out!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"phases out!")
name = get_visible_name()
//CHOMPEdit Start - Unequipping slots when phasing in, and preventing pulling stuff while phased.
diff --git a/code/modules/mob/living/carbon/human/species/station/monkey.dm b/code/modules/mob/living/carbon/human/species/station/monkey.dm
index 5819b10aca..d4721f8ac2 100644
--- a/code/modules/mob/living/carbon/human/species/station/monkey.dm
+++ b/code/modules/mob/living/carbon/human/species/station/monkey.dm
@@ -75,7 +75,7 @@
if(T.primitive_expression_messages.len)
geneexpression = pick(T.primitive_expression_messages)
if(geneexpression)
- H.custom_emote(VISIBLE_MESSAGE, "[geneexpression]")
+ H.automatic_custom_emote(VISIBLE_MESSAGE, "[geneexpression]", check_stat = TRUE)
else
H.emote(pick("scratch","jump","roll","tail"))
// More... intense, expressions...
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index 377df43a9a..63edb97c4a 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -178,7 +178,7 @@ var/list/channel_to_radio_key = new
//Maybe they are using say/whisper to do a quick emote, so do those
switch(copytext(message, 1, 2))
if("*") return emote(copytext(message, 2))
- if("^") return custom_emote(1, copytext(message, 2))
+ if("^") return custom_emote(VISIBLE_MESSAGE, copytext(message, 2))
//Parse the radio code and consume it
if(message_mode)
@@ -318,7 +318,7 @@ var/list/channel_to_radio_key = new
//Handle nonverbal languages here
for(var/datum/multilingual_say_piece/S in message_pieces)
if((S.speaking.flags & NONVERBAL) || (S.speaking.flags & INAUDIBLE))
- custom_emote(1, "[pick(S.speaking.signlang_verb)].")
+ custom_emote(VISIBLE_MESSAGE, "[pick(S.speaking.signlang_verb)].")
do_sound = FALSE
//These will contain the main receivers of the message
diff --git a/code/modules/mob/living/simple_mob/on_click.dm b/code/modules/mob/living/simple_mob/on_click.dm
index 59bf6a4084..18de46df13 100644
--- a/code/modules/mob/living/simple_mob/on_click.dm
+++ b/code/modules/mob/living/simple_mob/on_click.dm
@@ -20,7 +20,7 @@
if(src.zone_sel.selecting == BP_GROIN) //CHOMPEdit
if(src.vore_bellyrub(A)) //ChompEDIT
return //ChompEDIT
- custom_emote(1,"[pick(friendly)] \the [A]!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"[pick(friendly)] \the [A]!", check_stat = TRUE)
if(istype(A,/obj/structure/micro_tunnel)) //Allows simplemobs to click on mouse holes, mice should be allowed to go in mouse holes, and other mobs
var/obj/structure/micro_tunnel/t = A //should be allowed to drag the mice out of the mouse holes!
t.tunnel_interact(src)
@@ -30,7 +30,7 @@
return
else if(melee_damage_upper == 0 && isliving(A))
- custom_emote(1,"[pick(friendly)] \the [A]!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"[pick(friendly)] \the [A]!", check_stat = TRUE)
else
attack_target(A)
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm b/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm
index 0665d483c3..35aaac6353 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm
@@ -49,7 +49,7 @@
//Cosmetics mostly
flick("phasein",src)
- custom_emote(1,"phases in!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"phases in!")
sleep(30) //The duration of the TP animation
is_shifting = FALSE
canmove = original_canmove
@@ -87,7 +87,7 @@
else
shifted_out = TRUE
shift_state = AB_SHIFT_PASSIVE
- custom_emote(1,"phases out!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"phases out!")
real_name = name
name = "Something"
health = maxHealth //Fullheal
@@ -143,7 +143,7 @@
is_shifting = TRUE
shifted_out = TRUE
- custom_emote(1,"phases out!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"phases out!")
real_name = name
name = "Something"
@@ -183,7 +183,7 @@
//Cosmetics mostly
flick("phasein",src)
- custom_emote(1,"phases in!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"phases in!")
sleep(30) //The duration of the TP animation
is_shifting = FALSE
canmove = original_canmove
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/dragon.dm b/code/modules/mob/living/simple_mob/subtypes/vore/dragon.dm
index 8330aabae8..0502f8cdc6 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/dragon.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/dragon.dm
@@ -58,7 +58,7 @@
/mob/living/simple_mob/vore/aggressive/dragon/FindTarget()
. = ..()
if(.)
- custom_emote(1,"snaps at [.]")
+ customautomatic_custom_emote_emote(1,"snaps at [.]")
*/
// Activate Noms!
/mob/living/simple_mob/vore/aggressive/dragon
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/fennec.dm b/code/modules/mob/living/simple_mob/subtypes/vore/fennec.dm
index 216c60c857..1dcf4a93cb 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/fennec.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/fennec.dm
@@ -173,12 +173,12 @@
var/mob/living/L = A
if(will_eat(L))
var/obj/belly/B = vore_organs[1]
- custom_emote(message = "snatches and devours [L]!")
+ automatic_custom_emote(message = "snatches and devours [L]!")
B.nom_mob(L)
ai_holder.find_target()
return
else if(L.size_multiplier <= 0.5 && L.step_mechanics_pref)
- custom_emote(message = "stomps [L] into oblivion!")
+ automatic_custom_emote(message = "stomps [L] into oblivion!")
L.gib()
return
else
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/c_shift.dm b/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/c_shift.dm
index 70a0daad48..dffdfdc88f 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/c_shift.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/c_shift.dm
@@ -36,7 +36,7 @@
//Cosmetics mostly
flick("tp_in",src)
- custom_emote(1,"phases in!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"phases in!")
sleep(5) //The duration of the TP animation
canmove = original_canmove
@@ -56,7 +56,7 @@
else
ability_flags |= AB_PHASE_SHIFTED
mouse_opacity = 0
- custom_emote(1,"phases out!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"phases out!")
real_name = name
name = "Something"
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm
index 22551332db..29c74e1d36 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm
@@ -61,7 +61,7 @@
//Cosmetics mostly
flick("tp_in",src)
- INVOKE_ASYNC(src, PROC_REF(custom_emote),1,"phases in!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"phases in!")
addtimer(CALLBACK(src, PROC_REF(shadekin_complete_phase_in), original_canmove), 5, TIMER_DELETE_ME)
@@ -118,7 +118,7 @@
// change
ability_flags |= AB_PHASE_SHIFTED
throwpass = TRUE
- custom_emote(1,"phases out!")
+ automatic_custom_emote(VISIBLE_MESSAGE,"phases out!")
real_name = name
name = "Something"
diff --git a/code/modules/organs/internal/appendix.dm b/code/modules/organs/internal/appendix.dm
index 36c380a57c..1f53326fb5 100644
--- a/code/modules/organs/internal/appendix.dm
+++ b/code/modules/organs/internal/appendix.dm
@@ -23,11 +23,11 @@
if(inflamed == 1)
if(prob(5))
to_chat(owner, span_warning("You feel a stinging pain in your abdomen!"))
- owner.custom_emote(VISIBLE_MESSAGE, "winces slightly.")
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "winces slightly.", check_stat = TRUE)
if(inflamed > 1)
if(prob(3))
to_chat(owner, span_warning("You feel a stabbing pain in your abdomen!"))
- owner.custom_emote(VISIBLE_MESSAGE, "winces painfully.")
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "winces painfully.", check_stat = TRUE)
owner.adjustToxLoss(1)
if(inflamed > 2)
if(prob(1))
diff --git a/code/modules/organs/internal/lungs.dm b/code/modules/organs/internal/lungs.dm
index f196b271d1..87e1954615 100644
--- a/code/modules/organs/internal/lungs.dm
+++ b/code/modules/organs/internal/lungs.dm
@@ -13,27 +13,27 @@
if(is_broken())
if(prob(4))
- spawn owner?.custom_emote(VISIBLE_MESSAGE, "coughs up a large amount of blood!")
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "coughs up a large amount of blood!", check_stat = TRUE)
var/bleeding_rng = rand(3,5)
owner.drip(bleeding_rng)
if(prob(8)) //This is a medical emergency. Will kill within minutes unless exceedingly lucky.
- spawn owner?.custom_emote(VISIBLE_MESSAGE, "gasps for air!")
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "gasps for air!", check_stat = TRUE)
owner.AdjustLosebreath(15)
else if(is_bruised()) //Only bruised? That's an annoyance and can cause some more damage (via brainloss due to oxyloss)
if(prob(2)) //But let's not kill people too quickly.
- spawn owner?.custom_emote(VISIBLE_MESSAGE, "coughs up a small amount of blood!")
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "coughs up a small amount of blood!", check_stat = TRUE)
var/bleeding_rng = rand(1,2)
owner.drip(bleeding_rng)
if(prob(4)) //Get to medical quickly. but shouldn't kill without exceedingly bad RNG.
- spawn owner?.custom_emote(VISIBLE_MESSAGE, "gasps for air!")
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "gasps for air!", check_stat = TRUE)
owner.AdjustLosebreath(10) //Losebreath is a DoT that does 1:1 damage and prevents oxyloss healing via breathing.
if(owner.internal_organs_by_name[O_BRAIN]) // As the brain starts having Trouble, the lungs start malfunctioning.
var/obj/item/organ/internal/brain/Brain = owner.internal_organs_by_name[O_BRAIN]
if(Brain.get_control_efficiency() <= 0.8)
if(prob(4 / max(0.1,Brain.get_control_efficiency())))
- spawn owner?.custom_emote(VISIBLE_MESSAGE, "gasps for air!")
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "gasps for air!", check_stat = TRUE)
owner.AdjustLosebreath(round(3 / max(0.1,Brain.get_control_efficiency())))
/obj/item/organ/internal/lungs/proc/rupture()
diff --git a/code/modules/overmap/ships/panicbutton.dm b/code/modules/overmap/ships/panicbutton.dm
index 79f1bb776a..49f1670c85 100644
--- a/code/modules/overmap/ships/panicbutton.dm
+++ b/code/modules/overmap/ships/panicbutton.dm
@@ -36,16 +36,16 @@
// Glass present
else if(glass)
if(user.a_intent == I_HURT)
- user.custom_emote(VISIBLE_MESSAGE, "smashes the glass on [src]!")
+ user.automatic_custom_emote(VISIBLE_MESSAGE, "smashes the glass on [src]!")
glass = FALSE
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg')
update_icon()
else
- user.custom_emote(VISIBLE_MESSAGE, "pats [src] in a friendly manner.")
+ user.automatic_custom_emote(VISIBLE_MESSAGE, "pats [src] in a friendly manner.")
to_chat(user, span_warning("If you're trying to break the glass, you'll have to hit it harder than that..."))
// Must be !glass and !launched
else
- user.custom_emote(VISIBLE_MESSAGE, "pushes the button on [src]!")
+ user.automatic_custom_emote(VISIBLE_MESSAGE, "pushes the button on [src]!")
launch(user)
playsound(src, get_sfx("button"))
update_icon()
diff --git a/code/modules/reagents/reagents/medicine.dm b/code/modules/reagents/reagents/medicine.dm
index 574cd0597a..22c418cab2 100644
--- a/code/modules/reagents/reagents/medicine.dm
+++ b/code/modules/reagents/reagents/medicine.dm
@@ -927,27 +927,27 @@
metabolism = REM * 0.06
/datum/reagent/immunosuprizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
- var/strength_mod = 1 * M.species.chem_strength_heal
+ var/strength_mod = 1 // * M.species.chem_strength_heal //Just removing the chem strength adjustment. It'd require division, which is best avoided.
if(alien == IS_DIONA) // It's a tree.
- strength_mod = 0.25
+ strength_mod = 4
if(alien == IS_SLIME) // Diffculty bonding with internal cellular structure.
- strength_mod = 0.75
+ strength_mod = 1.3
if(alien == IS_SKRELL) // Natural inclination toward toxins.
- strength_mod = 1.5
+ strength_mod = 0.66
if(alien == IS_UNATHI) // Natural regeneration, robust biology.
- strength_mod = 1.75
+ strength_mod = 0.6
if(alien == IS_TAJARA) // Highest metabolism.
- strength_mod = 2
+ strength_mod = 0.5
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(alien != IS_DIONA)
- H.adjustToxLoss((30 / strength_mod) * removed)
+ H.adjustToxLoss((30 * strength_mod) * removed)
var/list/organtotal = list()
organtotal |= H.organs
@@ -969,7 +969,7 @@
var/rejectmem = I.can_reject
I.can_reject = initial(I.can_reject)
if(rejectmem != I.can_reject)
- H.adjustToxLoss((15 / strength_mod))
+ H.adjustToxLoss((15 / strength_mod) * removed) //Someone forgot a * removed here in the past. It made it so 1u of this chem would do (baseline) 1245 toxins per unit, or 15 toxins per tick.
I.take_damage(1)
/datum/reagent/skrellimmuno //skrell exist?
diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm
index 1836e79254..05d8597f64 100644
--- a/code/modules/surgery/organs_internal.dm
+++ b/code/modules/surgery/organs_internal.dm
@@ -403,7 +403,7 @@
ML.parent_organ = affected.organ_tag
organ_compatible = 1
else
- to_chat(user, "\The [O] won't fit in \the [affected.name].")
+ to_chat(user, span_warning("\The [O] won't fit in \the [affected.name]."))
return SURGERY_FAILURE
// CHOMPadd end
diff --git a/modular_chomp/code/modules/organs/internal/malignant/malignant.dm b/modular_chomp/code/modules/organs/internal/malignant/malignant.dm
index 9326fbcb2a..59cf145511 100644
--- a/modular_chomp/code/modules/organs/internal/malignant/malignant.dm
+++ b/modular_chomp/code/modules/organs/internal/malignant/malignant.dm
@@ -157,11 +157,11 @@
owner.AdjustConfused(4 * base_mult)
var/obj/item/organ/O = owner.organs_by_name[parent_organ]
if(damage >= min_broken_damage)
- owner.custom_pain("You feel a painful sensation in your [O.name].",damage,TRUE)
+ owner.custom_pain(span_warning("You feel a painful sensation in your [O.name]."),damage,TRUE)
owner.AdjustBlinded(6 * base_mult)
owner.adjustToxLoss(4 * base_mult)
else
- owner.custom_pain("You feel a strange sensation in your [O.name].",damage / 10,TRUE)
+ owner.custom_pain(span_warning("You feel a strange sensation in your [O.name]."),damage / 10,TRUE)
/****************************************************
Tumor varients
@@ -250,14 +250,14 @@
/obj/item/organ/internal/malignant/tumor/potato/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/material/knife))
new /obj/item/reagent_containers/food/snacks/rawsticks(get_turf(src))
- to_chat(user, "You cut the mimetic potato.")
+ to_chat(user, span_notice("You cut the mimetic potato."))
qdel(src)
return
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(C.use(5))
//TODO: generalize this.
- to_chat(user, "You add some cable to the [src.name] and slide it inside the battery casing.")
+ to_chat(user, span_notice("You add some cable to the [src.name] and slide it inside the battery casing."))
var/obj/item/cell/potato/pocell = new /obj/item/cell/potato(get_turf(user))
if(src.loc == user && ishuman(user))
user.put_in_hands(pocell)
@@ -305,14 +305,14 @@
if(prob(2))
var/obj/item/organ/O = owner.organs_by_name[parent_organ]
if(stage_progress > 200)
- owner.custom_pain("You feel bloated. The pain in your [O.name] is agonizing.",20,TRUE)
- owner.custom_emote(VISIBLE_MESSAGE, "winces slightly.")
+ owner.custom_pain(span_warning("You feel bloated. The pain in your [O.name] is agonizing."),20,TRUE)
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "winces slightly.", check_stat = TRUE)
else if(stage_progress > 100)
- owner.custom_pain("You feel a pressure inside your [O.name].",5,TRUE)
- owner.custom_emote(VISIBLE_MESSAGE, "winces painfully.")
+ owner.custom_pain(span_warning("You feel a pressure inside your [O.name]."),5,TRUE)
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "winces painfully.", check_stat = TRUE)
else
- owner.custom_pain("The pressure inside your [O.name] hurts.",1,TRUE)
- owner.custom_emote(VISIBLE_MESSAGE, "winces painfully.")
+ owner.custom_pain(span_danger("The pressure inside your [O.name] hurts."),1,TRUE)
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "winces painfully.", check_stat = TRUE)
/obj/item/organ/internal/malignant/tumor/pinata/attackby(obj/item/W as obj, mob/user as mob)
if(can_puncture(W))
@@ -459,11 +459,11 @@
if(thalers < 100)
pass()
else if(thalers < 500)
- owner.custom_pain("You feel bloated.",1,TRUE)
- owner.custom_emote(VISIBLE_MESSAGE, "winces slightly.")
+ owner.custom_pain(span_warning("You feel bloated."),1,TRUE)
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "winces slightly.", check_stat = TRUE)
else if(thalers < 1000)
- owner.custom_pain("You feel a pressure inside your [O.name].",6,TRUE)
- owner.custom_emote(VISIBLE_MESSAGE, "winces painfully.")
+ owner.custom_pain(span_warning("You feel a pressure inside your [O.name]."),6,TRUE)
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "winces painfully.", check_stat = TRUE)
if(prob(30))
owner.vomit()
else if(prob(30))
@@ -471,8 +471,8 @@
else
owner.Confuse(15)
else if(thalers < 5000)
- owner.custom_pain("The pressure inside your [O.name] hurts.",15,TRUE)
- owner.custom_emote(VISIBLE_MESSAGE, "winces painfully.")
+ owner.custom_pain(span_danger("The pressure inside your [O.name] hurts."),15,TRUE)
+ owner.automatic_custom_emote(VISIBLE_MESSAGE, "winces painfully.", check_stat = TRUE)
owner.Weaken(3)
if(prob(30))
owner.Stun(10)
diff --git a/modular_chomp/maps/relic_base/relicbase_things.dm b/modular_chomp/maps/relic_base/relicbase_things.dm
index 3167ced135..60bac2239b 100644
--- a/modular_chomp/maps/relic_base/relicbase_things.dm
+++ b/modular_chomp/maps/relic_base/relicbase_things.dm
@@ -26,10 +26,10 @@
/obj/effect/step_trigger/tramblock/Trigger(var/atom/movable/A)
if(istype(A, /mob/living/carbon/human))
- to_chat(A, "OOC Notice: You have an itch to explore, it seems! \
+ to_chat(A, span_notice("OOC Notice: You have an itch to explore, it seems! \
This tunnel does not go any further past the doors, thanks to game limitations and stuff in the way! \
However, north and the departures tram line extend the entire length of the map! \
- There's also other areas you can explore. Have fun. <3"
+ There's also other areas you can explore. Have fun. <3")
)
else
return 0
diff --git a/vorestation.dme b/vorestation.dme
index 8de2526d12..4a4874f99e 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -2566,6 +2566,7 @@
#include "code\modules\economy\vending_machines.dm"
#include "code\modules\economy\vending_machines_vr.dm"
#include "code\modules\economy\vending_refills.dm"
+#include "code\modules\emotes\custom_emote.dm"
#include "code\modules\emotes\emote_define.dm"
#include "code\modules\emotes\emote_mob.dm"
#include "code\modules\emotes\definitions\_mob.dm"