Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add medical HUD icon if the body has died recently enough to be defibbed #38909

Merged
merged 2 commits into from Jul 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions code/game/data_huds.dm
Expand Up @@ -175,6 +175,11 @@
if(has_trait(TRAIT_XENO_HOST))
holder.icon_state = "hudxeno"
else if(stat == DEAD || (has_trait(TRAIT_FAKEDEATH)))
if(tod)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tod

var/tdelta = round(world.time - timeofdeath)
if(tdelta < (DEFIB_TIME_LIMIT * 10))
holder.icon_state = "huddefib"
return
holder.icon_state = "huddead"
else
switch(virus_threat)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/death.dm
Expand Up @@ -74,6 +74,7 @@
update_canmove()
med_hud_set_health()
med_hud_set_status()
addtimer(CALLBACK(src, .proc/med_hud_set_status), (DEFIB_TIME_LIMIT * 10) + 1)
stop_pulling()

if (client)
Expand Down
Binary file modified icons/mob/hud.dmi
Binary file not shown.