mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Optimizes and adds missing limbs to health dolls
This commit is contained in:
@@ -614,6 +614,8 @@
|
||||
H.clear_alert("high")
|
||||
|
||||
/datum/species/proc/handle_hud_icons(mob/living/carbon/human/H)
|
||||
if(!H.client)
|
||||
return
|
||||
if(H.healths)
|
||||
if(H.stat == DEAD)
|
||||
H.healths.icon_state = "health7"
|
||||
@@ -633,11 +635,15 @@
|
||||
else H.healths.icon_state = "health6"
|
||||
|
||||
if(H.healthdoll)
|
||||
H.healthdoll.overlays.Cut()
|
||||
if(H.stat == DEAD)
|
||||
H.healthdoll.icon_state = "healthdoll_DEAD"
|
||||
if(H.healthdoll.overlays.len)
|
||||
H.healthdoll.overlays.Cut()
|
||||
else
|
||||
H.healthdoll.icon_state = "healthdoll_OVERLAY"
|
||||
var/list/new_overlays = list()
|
||||
var/list/cached_overlays = H.healthdoll.cached_healthdoll_overlays
|
||||
// Use the dead health doll as the base, since we have proper "healthy" overlays now
|
||||
H.healthdoll.icon_state = "healthdoll_DEAD"
|
||||
for(var/obj/item/organ/external/O in H.organs)
|
||||
var/damage = O.burn_dam + O.brute_dam
|
||||
var/comparison = (O.max_damage/5)
|
||||
@@ -652,8 +658,10 @@
|
||||
icon_num = 4
|
||||
if(damage > (comparison*4))
|
||||
icon_num = 5
|
||||
if(icon_num)
|
||||
H.healthdoll.overlays += image('icons/mob/screen_gen.dmi',"[O.limb_name][icon_num]")
|
||||
new_overlays += "[O.limb_name][icon_num]"
|
||||
H.healthdoll.overlays += (new_overlays - cached_overlays)
|
||||
H.healthdoll.overlays -= (cached_overlays - new_overlays)
|
||||
H.healthdoll.cached_healthdoll_overlays = new_overlays
|
||||
|
||||
switch(H.nutrition)
|
||||
if(NUTRITION_LEVEL_FULL to INFINITY)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
var/obj/screen/zone_sel/zone_sel = null
|
||||
var/obj/screen/leap_icon = null
|
||||
var/obj/screen/healthdoll = null
|
||||
var/obj/screen/healthdoll/healthdoll = null
|
||||
|
||||
var/use_me = 1 //Allows all mobs to use the me verb by default, will have to manually specify they cannot
|
||||
var/damageoverlaytemp = 0
|
||||
|
||||
Reference in New Issue
Block a user