From 09090cc224817e960d9343f95e9e412e1a394aa1 Mon Sep 17 00:00:00 2001 From: XDTM Date: Fri, 16 Sep 2016 14:28:47 +0200 Subject: [PATCH] Code fixes and fully_heal change --- code/game/data_huds.dm | 16 ++++++++++------ code/modules/mob/living/carbon/carbon.dm | 3 ++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 51476bad536..8cd3b7d2f89 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -61,13 +61,16 @@ //called when a carbon changes virus /mob/living/carbon/proc/check_virus() + var/threat = 0 for(var/datum/disease/D in viruses) if(!(D.visibility_flags & HIDDEN_SCANNER)) - if (D.severity == NONTHREAT) //a buffing virus gets an icon - return 2 + if (D.severity != NONTHREAT) //a buffing virus gets an icon + threat = 2 + return threat //harmful viruses have priority else - return 1 - return 0 + threat = 1 //aka good virus + + return threat //helper for getting the appropriate health status /proc/RoundHealth(mob/living/M) @@ -158,14 +161,15 @@ /mob/living/carbon/med_hud_set_status() var/image/holder = hud_list[STATUS_HUD] var/icon/I = icon(icon, icon_state, dir) + var/virus_state = check_virus() holder.pixel_y = I.Height() - world.icon_size if(status_flags & XENO_HOST) holder.icon_state = "hudxeno" else if(stat == DEAD || (status_flags & FAKEDEATH)) holder.icon_state = "huddead" - else if(check_virus() == 1) + else if(virus_state == 2) holder.icon_state = "hudill" - else if(check_virus() == 2) + else if(virus_state == 1) holder.icon_state = "hudbuff" else holder.icon_state = "hudhealthy" diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 0198c4a1cf8..94ee29b74b0 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -672,7 +672,8 @@ if(B) B.damaged_brain = 0 for(var/datum/disease/D in viruses) - D.cure(0) + if (D.severity != NONTHREAT) + D.cure(0) if(admin_revive) regenerate_limbs() handcuffed = initial(handcuffed)