diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index b458b95d8dc..7b6ada9364b 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -76,8 +76,15 @@ return 0 //helper for getting the appropriate health status UPDATED BY PUCKABOO2 TO INCLUDE NEGATIVES. -/proc/RoundHealth(health) - switch(health) +/proc/RoundHealth(mob/living/M) + if(M.stat == DEAD || (M.status_flags & FAKEDEATH)) + return "health-100" //what's our health? it doesn't matter, we're dead, or faking + var/maxi_health = M.maxHealth + if(iscarbon(M) && M.health < 0) + maxi_health = 100 //so crit shows up right for aliens and other high-health carbon mobs; noncarbons don't have crit. + var/resulthealth = (M.health / maxi_health) * 100 + + switch(resulthealth) if(100 to INFINITY) return "health100" if(95 to 100) @@ -138,7 +145,7 @@ //called when a living mob changes health /mob/living/proc/med_hud_set_health() var/image/holder = hud_list[HEALTH_HUD] - holder.icon_state = "hud[RoundHealth(health)]" + holder.icon_state = "hud[RoundHealth(src)]" //called when a carbon changes stat, virus or XENO_HOST diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index 54bdaf1b9cf..ba7f91e2c37 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -115,6 +115,7 @@ /mob/living/simple_animal/borer/New(atom/newloc, var/gen=1) ..(newloc) + remove_from_all_data_huds() generation = gen add_language("Cortical Link") notify_ghosts("A cortical borer has been created in [get_area(src)]!", enter_link = "(Click to enter)", source = src, action = NOTIFY_ATTACK) diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index 338484a5ebc..caec78f3594 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -53,6 +53,7 @@ var/perfectsouls = 0 //How many perfect, regen-cap increasing souls the revenant has. var/image/ghostimage = null //Visible to ghost with darkness off + /mob/living/simple_animal/revenant/Life() ..() if(revealed && essence <= 0) @@ -117,6 +118,7 @@ ghostimage = image(src.icon,src,src.icon_state) ghost_darkness_images |= ghostimage updateallghostimages() + remove_from_all_data_huds() spawn(5) if(src.mind) diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm index 25ebd7bc379..416610dd1c2 100644 --- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm +++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm @@ -57,6 +57,7 @@ /mob/living/simple_animal/slaughter/New() ..() + remove_from_all_data_huds() var/obj/effect/proc_holder/spell/bloodcrawl/bloodspell = new AddSpell(bloodspell) whisper_action = new() diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 9d9f0ed0c11..461b5193b69 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -108,18 +108,6 @@ health = Clamp(health, 0, maxHealth) med_hud_set_status() -/mob/living/simple_animal/handle_hud_icons_health() - ..() - if(healths && maxHealth > 0) - switch(health / maxHealth * 30) - if(30 to INFINITY) healths.icon_state = "health0" - if(26 to 29) healths.icon_state = "health1" - if(21 to 25) healths.icon_state = "health2" - if(16 to 20) healths.icon_state = "health3" - if(11 to 15) healths.icon_state = "health4" - if(6 to 10) healths.icon_state = "health5" - if(1 to 5) healths.icon_state = "health6" - if(0) healths.icon_state = "health7" /mob/living/simple_animal/proc/process_ai() handle_automated_movement()