Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into auxtools-atmos
This commit is contained in:
@@ -542,8 +542,48 @@
|
||||
update_stat()
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
update_health_hud()
|
||||
|
||||
//proc used to ressuscitate a mob
|
||||
/mob/living/update_health_hud()
|
||||
var/severity = 0
|
||||
var/healthpercent = (health/maxHealth) * 100
|
||||
if(hud_used?.healthdoll) //to really put you in the boots of a simplemob
|
||||
var/obj/screen/healthdoll/living/livingdoll = hud_used.healthdoll
|
||||
switch(healthpercent)
|
||||
if(100 to INFINITY)
|
||||
livingdoll.icon_state = "living0"
|
||||
if(80 to 100)
|
||||
livingdoll.icon_state = "living1"
|
||||
severity = 1
|
||||
if(60 to 80)
|
||||
livingdoll.icon_state = "living2"
|
||||
severity = 2
|
||||
if(40 to 60)
|
||||
livingdoll.icon_state = "living3"
|
||||
severity = 3
|
||||
if(20 to 40)
|
||||
livingdoll.icon_state = "living4"
|
||||
severity = 4
|
||||
if(1 to 20)
|
||||
livingdoll.icon_state = "living5"
|
||||
severity = 5
|
||||
else
|
||||
livingdoll.icon_state = "living6"
|
||||
severity = 6
|
||||
if(!livingdoll.filtered)
|
||||
livingdoll.filtered = TRUE
|
||||
var/icon/mob_mask = icon(icon, icon_state)
|
||||
if(mob_mask.Height() > world.icon_size || mob_mask.Width() > world.icon_size)
|
||||
var/health_doll_icon_state = health_doll_icon ? health_doll_icon : "megasprite"
|
||||
mob_mask = icon('icons/mob/screen_gen.dmi', health_doll_icon_state) //swap to something generic if they have no special doll
|
||||
UNLINT(livingdoll.filters += filter(type="alpha", icon = mob_mask))
|
||||
livingdoll.filters += filter(type="drop_shadow", size = -1)
|
||||
if(severity > 0)
|
||||
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
|
||||
else
|
||||
clear_fullscreen("brute")
|
||||
|
||||
//Proc used to resuscitate a mob, for full_heal see fully_heal()
|
||||
/mob/living/proc/revive(full_heal = FALSE, admin_revive = FALSE)
|
||||
SEND_SIGNAL(src, COMSIG_LIVING_REVIVE, full_heal, admin_revive)
|
||||
if(full_heal)
|
||||
|
||||
Reference in New Issue
Block a user