Skip to content

Commit

Permalink
Adds niche logs to revival attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Jun 14, 2024
1 parent 63ce33d commit 51ae2de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/game/objects/items/devices/defibrillator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@
playsound(get_turf(src), 'sound/items/defib_failed.ogg', 25, 0)
if(heart && heart.organ_status >= ORGAN_BROKEN)
user.visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Defibrillation failed. Patient's heart is too damaged. Immediate surgery is advised."))
msg_admin_niche("[key_name_admin(user)] failed an attempt to revive [key_name_admin(H)] with [src] because of heart damage.")
return
user.visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Defibrillation failed. Patient's general condition does not allow reviving."))
msg_admin_niche("[key_name_admin(user)] failed an attempt to revive [key_name_admin(H)] with [src].")
return

if(!H.client) //Freak case, no client at all. This is a braindead mob (like a colonist)
Expand All @@ -227,6 +229,7 @@
break
if(H.health > HEALTH_THRESHOLD_DEAD)
user.visible_message(SPAN_NOTICE("[icon2html(src, viewers(src))] \The [src] beeps: Defibrillation successful."))
msg_admin_niche("[key_name_admin(user)] successfully revived [key_name_admin(H)] with [src].")
playsound(get_turf(src), 'sound/items/defib_success.ogg', 25, 0)
user.track_life_saved(user.job)
user.life_revives_total++
Expand All @@ -239,6 +242,7 @@
window_flash(H.client)
else
user.visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Defibrillation failed. Vital signs are too weak, repair damage and try again.")) //Freak case
msg_admin_niche("[key_name_admin(user)] failed an attempt to revive [key_name_admin(H)] with [src] because of weak vitals.")
playsound(get_turf(src), 'sound/items/defib_failed.ogg', 25, 0)
if(heart && prob(25))
heart.take_damage(rand(min_heart_damage_dealt, max_heart_damage_dealt), TRUE) // Make death and revival leave lasting consequences
Expand Down

0 comments on commit 51ae2de

Please sign in to comment.