Makes organ damage messages respect visibility (#17900)

* Make bone cracking audible instead of visible

* Cleans up some other messages as well
This commit is contained in:
Luc
2022-05-31 12:21:46 +01:00
committed by GitHub
parent 56e8dc4293
commit 7fed0b1438
+16 -15
View File
@@ -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(
"<span class='danger'>\The [owner]'s [src.name] flies off in an arc!</span>",\
"<span class='moderate'><b>Your [src.name] goes flying off!</b></span>",\
"<span class='danger'>\The [owner]'s [name] flies off in an arc!</span>",\
"<span class='moderate'><b>Your [name] goes flying off!</b></span>",\
"<span class='danger'>You hear a terrible sound of [gore_sound].</span>")
if(DROPLIMB_BURN)
var/gore = "[is_robotic() ? "" : " of burning flesh"]"
owner.visible_message(
"<span class='danger'>\The [owner]'s [src.name] flashes away into ashes!</span>",\
"<span class='moderate'><b>Your [src.name] flashes away into ashes!</b></span>",\
"<span class='danger'>\The [owner]'s [name] flashes away into ashes!</span>",\
"<span class='moderate'><b>Your [name] flashes away into ashes!</b></span>",\
"<span class='danger'>You hear a crackling sound[gore].</span>")
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(
"<span class='danger'>\The [owner]'s [src.name] explodes[gore]!</span>",\
"<span class='moderate'><b>Your [src.name] explodes[gore]!</b></span>",\
"<span class='danger'>\The [owner]'s [name] explodes[gore]!</span>",\
"<span class='moderate'><b>Your [name] explodes[gore]!</b></span>",\
"<span class='danger'>You hear the [gore_sound].</span>")
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(\
"<span class='warning'>You hear a loud cracking sound coming from \the [owner].</span>",\
"<span class='danger'>Something feels like it shattered in your [name]!</span>",\
"You hear a sickening crack.")
owner.audible_message(
"<span class='warning'>You hear a sickening crack coming from \the [owner].</span>",
"<span class='danger'>[owner]'s [name] appears to buckle unnaturally!</span>"
)
to_chat(owner, "<span class='userdanger'>Something feels like it shattered in your [name]!</span>")
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(
"<span class='danger'>\The [victim]'s [src.name] explodes violently!</span>",\
"<span class='danger'>Your [src.name] explodes!</span>",\
"<span class='danger'>\The [victim]'s [name] explodes violently!</span>",\
"<span class='userdanger'>Your [name] explodes!</span>",\
"<span class='danger'>You hear an explosion!</span>")
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("<span class='warning'>You hear a sickening sound coming from \the [owner]'s [name] as it turns into a mangled mess!</span>", \
"<span class='danger'>Your [name] becomes a mangled mess!</span>", \
owner.visible_message("<span class='warning'>\The [owner]'s [name] turns into a mangled mess!</span>", \
"<span class='userdanger'>Your [name] becomes a mangled mess!</span>", \
"<span class='warning'>You hear a sickening sound.</span>")
status |= ORGAN_DISFIGURED