From 7fed0b1438ae0d7659bc03bc49a8e0ab7dd07a5e Mon Sep 17 00:00:00 2001
From: Luc <89928798+lewcc@users.noreply.github.com>
Date: Tue, 31 May 2022 04:21:46 -0700
Subject: [PATCH] Makes organ damage messages respect visibility (#17900)
* Make bone cracking audible instead of visible
* Cleans up some other messages as well
---
code/modules/surgery/organs/organ_external.dm | 31 ++++++++++---------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm
index 541d7298ec2..adf5e6bf8d6 100644
--- a/code/modules/surgery/organs/organ_external.dm
+++ b/code/modules/surgery/organs/organ_external.dm
@@ -479,21 +479,21 @@ Note that amputating the affected organ does in fact remove the infection from t
if(!clean)
var/gore_sound = "[is_robotic() ? "tortured metal" : "ripping tendons and flesh"]"
owner.visible_message(
- "\The [owner]'s [src.name] flies off in an arc!",\
- "Your [src.name] goes flying off!",\
+ "\The [owner]'s [name] flies off in an arc!",\
+ "Your [name] goes flying off!",\
"You hear a terrible sound of [gore_sound].")
if(DROPLIMB_BURN)
var/gore = "[is_robotic() ? "" : " of burning flesh"]"
owner.visible_message(
- "\The [owner]'s [src.name] flashes away into ashes!",\
- "Your [src.name] flashes away into ashes!",\
+ "\The [owner]'s [name] flashes away into ashes!",\
+ "Your [name] flashes away into ashes!",\
"You hear a crackling sound[gore].")
if(DROPLIMB_BLUNT)
var/gore = "[is_robotic() ? "": " in shower of gore"]"
var/gore_sound = "[is_robotic() ? "rending sound of tortured metal" : "sickening splatter of gore"]"
owner.visible_message(
- "\The [owner]'s [src.name] explodes[gore]!",\
- "Your [src.name] explodes[gore]!",\
+ "\The [owner]'s [name] explodes[gore]!",\
+ "Your [name] explodes[gore]!",\
"You hear the [gore_sound].")
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
@@ -621,16 +621,17 @@ Note that amputating the affected organ does in fact remove the infection from t
if((status & ORGAN_BROKEN) || (limb_flags & CANNOT_BREAK))
return
if(owner)
- owner.visible_message(\
- "You hear a loud cracking sound coming from \the [owner].",\
- "Something feels like it shattered in your [name]!",\
- "You hear a sickening crack.")
+ owner.audible_message(
+ "You hear a sickening crack coming from \the [owner].",
+ "[owner]'s [name] appears to buckle unnaturally!"
+ )
+ to_chat(owner, "Something feels like it shattered in your [name]!")
playsound(owner, "bonebreak", 150, 1)
if(!HAS_TRAIT(owner, TRAIT_NOPAIN))
owner.emote("scream")
status |= ORGAN_BROKEN
- broken_description = pick("broken","fracture","hairline fracture")
+ broken_description = pick("broken", "fracture", "hairline fracture")
perma_injury = brute_dam
// Fractures have a chance of getting you out of restraints
@@ -759,8 +760,8 @@ Note that amputating the affected organ does in fact remove the infection from t
//Robotic limbs explode if sabotaged.
if(is_robotic() && sabotaged)
victim.visible_message(
- "\The [victim]'s [src.name] explodes violently!",\
- "Your [src.name] explodes!",\
+ "\The [victim]'s [name] explodes violently!",\
+ "Your [name] explodes!",\
"You hear an explosion!")
explosion(get_turf(owner),-1,-1,2,3)
do_sparks(5, 0, victim)
@@ -770,8 +771,8 @@ Note that amputating the affected organ does in fact remove the infection from t
if(status & ORGAN_DISFIGURED)
return
if(owner)
- owner.visible_message("You hear a sickening sound coming from \the [owner]'s [name] as it turns into a mangled mess!", \
- "Your [name] becomes a mangled mess!", \
+ owner.visible_message("\The [owner]'s [name] turns into a mangled mess!", \
+ "Your [name] becomes a mangled mess!", \
"You hear a sickening sound.")
status |= ORGAN_DISFIGURED