mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
Move IPCs from being shown on medhud to diagnostic hud (#17897)
* Move IPCs from being shown on medhud to diagnostic hud * review + runtime fix * missed this one
This commit is contained in:
@@ -86,6 +86,8 @@
|
||||
return TRUE
|
||||
if(undergoing_cardiac_arrest())
|
||||
return TRUE
|
||||
if(ismachineperson(src) && health < 0)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/// Whether a virus worthy displaying on the HUD is present.
|
||||
@@ -167,9 +169,10 @@
|
||||
//called when a living mob changes health
|
||||
/mob/living/proc/med_hud_set_health()
|
||||
var/image/holder = hud_list[HEALTH_HUD]
|
||||
if(ismachineperson(src))
|
||||
holder = hud_list[DIAG_HUD]
|
||||
holder.icon_state = "hud[RoundHealth(src)]"
|
||||
|
||||
|
||||
//called when a carbon changes stat, virus or XENO_HOST
|
||||
/mob/living/proc/med_hud_set_status()
|
||||
var/image/holder = hud_list[STATUS_HUD]
|
||||
@@ -181,12 +184,16 @@
|
||||
//called when a carbon changes stat, virus or XENO_HOST
|
||||
/mob/living/carbon/med_hud_set_status()
|
||||
var/image/holder = hud_list[STATUS_HUD]
|
||||
if(ismachineperson(src))
|
||||
holder = hud_list[DIAG_STAT_HUD]
|
||||
var/mob/living/simple_animal/borer/B = has_brain_worms()
|
||||
// To the right of health bar
|
||||
if(stat == DEAD || HAS_TRAIT(src, TRAIT_FAKEDEATH))
|
||||
var/revivable
|
||||
if(!ghost_can_reenter()) // DNR or AntagHUD
|
||||
revivable = FALSE
|
||||
else if(ismachineperson(src))
|
||||
revivable = TRUE
|
||||
else if(timeofdeath && (round(world.time - timeofdeath) < DEFIB_TIME_LIMIT))
|
||||
revivable = TRUE
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/mob/living/carbon/human
|
||||
|
||||
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPMINDSHIELD_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,GLAND_HUD)
|
||||
hud_possible = list(
|
||||
HEALTH_HUD, STATUS_HUD, SPECIALROLE_HUD, // from /mob/living
|
||||
ID_HUD, WANTED_HUD, IMPMINDSHIELD_HUD, IMPCHEM_HUD, IMPTRACK_HUD, GLAND_HUD,
|
||||
DIAG_STAT_HUD, DIAG_HUD // for IPCs
|
||||
)
|
||||
pressure_resistance = 25
|
||||
mob_biotypes = MOB_ORGANIC | MOB_HUMANOID
|
||||
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
|
||||
|
||||
@@ -83,11 +83,23 @@
|
||||
..()
|
||||
monitor = new()
|
||||
monitor.Grant(H)
|
||||
for(var/datum/atom_hud/data/human/medical/medhud in GLOB.huds)
|
||||
medhud.remove_from_hud(H)
|
||||
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
|
||||
diag_hud.add_to_hud(H)
|
||||
H.med_hud_set_health()
|
||||
H.med_hud_set_status()
|
||||
|
||||
/datum/species/machine/on_species_loss(mob/living/carbon/human/H)
|
||||
..()
|
||||
if(monitor)
|
||||
monitor.Remove(H)
|
||||
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
|
||||
diag_hud.remove_from_hud(H)
|
||||
for(var/datum/atom_hud/data/human/medical/medhud in GLOB.huds)
|
||||
medhud.add_to_hud(H)
|
||||
H.med_hud_set_health()
|
||||
H.med_hud_set_status()
|
||||
|
||||
/datum/species/machine/handle_death(gibbed, mob/living/carbon/human/H)
|
||||
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
create_debug_log("woke up, trigger reason: [reason]")
|
||||
update_damage_hud()
|
||||
update_health_hud()
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
|
||||
/mob/living/carbon/update_stamina()
|
||||
|
||||
Reference in New Issue
Block a user