Adds a new hud icon for non-DNR bodies with clients (#22786)

* bam, new hud

* umm, maybe

* dmi change
This commit is contained in:
Contrabang
2023-10-14 20:44:20 +02:00
committed by GitHub
parent f8f3126ba7
commit 4a7019f919
5 changed files with 21 additions and 10 deletions
+1
View File
@@ -135,6 +135,7 @@
stack_trace("transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob.")
if(current) //remove ourself from our old body's mind variable
current.mind = null
current.med_hud_set_status()
leave_all_huds() //leave all the huds in the old body, so it won't get huds if somebody else enters it
SStgui.on_transfer(current, new_character)
+15 -10
View File
@@ -186,18 +186,23 @@
// To the right of health bar
if(stat == DEAD || HAS_TRAIT(src, TRAIT_FAKEDEATH))
var/revivable
var/revivable_state = "dead"
if(!ghost_can_reenter()) // DNR or AntagHUD
revivable = FALSE
else if(ismachineperson(src))
revivable = TRUE
else if(timeofdeath && is_revivable())
revivable = TRUE
if(revivable)
holder.icon_state = "hudflatline"
revivable_state = "dead"
else if(ismachineperson(src) || (timeofdeath && is_revivable()))
revivable_state = "flatline"
else if(!mind)
revivable_state = "dead"
else
holder.icon_state = "huddead"
var/foundghost = FALSE
for(var/mob/dead/observer/G in GLOB.player_list)
if(G.mind.current == src)
foundghost = (G.can_reenter_corpse && G.client)
break
if(foundghost || key)
revivable_state = "hassoul"
holder.icon_state = "hud[revivable_state]"
else if(HAS_TRAIT(src, TRAIT_XENO_HOST))
holder.icon_state = "hudxeno"
@@ -4,6 +4,9 @@
ghostimage.icon_state = src.icon_state
updateghostimages()
if(mind?.current)
mind.current.med_hud_set_status()
if(GLOB.non_respawnable_keys[ckey])
can_reenter_corpse = 0
REMOVE_TRAIT(src, TRAIT_RESPAWNABLE, GHOSTED)
@@ -5,3 +5,5 @@
spawn(0)
if(src && !key) //we've transferred to another mob. This ghost should be deleted.
qdel(src)
if(mind?.current)
mind.current.med_hud_set_status()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB