Skip to content

Commit

Permalink
Adds niche logs to revival attempts (#6465)
Browse files Browse the repository at this point in the history
# About the pull request

This PR simply adds niche admin logs for defib attempts.

# Explain why it's good for the game

More logs.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>


![image](https://github.com/cmss13-devs/cmss13/assets/76988376/ec8bbc5a-657a-4756-8b5a-e53e9ccd4d87)

</details>


# Changelog
:cl: Drathek
admin: Added niche logging for revival attempts
/:cl:
  • Loading branch information
Drulikar authored Jun 15, 2024
1 parent 48dd274 commit 64bdcc4
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 64bdcc4

Please sign in to comment.