Merge pull request #2073 from Yoshax/medhuds

Medhuds
This commit is contained in:
Neerti
2016-07-09 22:42:51 -04:00
committed by GitHub
7 changed files with 16 additions and 28 deletions
+6 -21
View File
@@ -119,27 +119,12 @@ proc/age2agedescription(age)
if(70 to INFINITY) return "elderly"
else return "unknown"
proc/RoundHealth(health)
switch(health)
if(100 to INFINITY)
return "health100"
if(70 to 100)
return "health80"
if(50 to 70)
return "health60"
if(30 to 50)
return "health40"
if(18 to 30)
return "health25"
if(5 to 18)
return "health10"
if(1 to 5)
return "health1"
if(-99 to 0)
return "health0"
else
return "health-100"
return "0"
/proc/RoundHealth(health)
var/list/icon_states = icon_states('icons/mob/hud_med.dmi')
for(var/icon_state in icon_states)
if(health >= text2num(icon_state))
return icon_state
return icon_states[icon_states.len] // If we had no match, return the last element
/*
Proc for attack log creation, because really why not
+3 -3
View File
@@ -91,15 +91,15 @@
break
holder = patient.hud_list[HEALTH_HUD]
if(patient.stat == 2)
if(patient.stat == DEAD)
holder.icon_state = "hudhealth-100"
C.images += holder
else
holder.icon_state = "hud[RoundHealth((patient.health-config.health_threshold_crit)/(patient.maxHealth-config.health_threshold_crit)*100)]"
holder.icon_state = RoundHealth((patient.health-config.health_threshold_crit)/(patient.maxHealth-config.health_threshold_crit)*100)
C.images += holder
holder = patient.hud_list[STATUS_HUD]
if(patient.stat == 2)
if(patient.stat == DEAD)
holder.icon_state = "huddead"
else if(foundVirus)
holder.icon_state = "hudill"
@@ -27,7 +27,7 @@
if(mind)
mind.name = real_name
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
hud_list[HEALTH_HUD] = image('icons/mob/hud_med.dmi', src, "100")
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
hud_list[LIFE_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudunknown")
+2 -3
View File
@@ -1495,10 +1495,9 @@
if (BITTEST(hud_updateflag, HEALTH_HUD))
var/image/holder = hud_list[HEALTH_HUD]
if(stat == DEAD)
holder.icon_state = "hudhealth-100" // X_X
holder.icon_state = "-100" // X_X
else
var/percentage_health = RoundHealth((health-config.health_threshold_crit)/(maxHealth-config.health_threshold_crit)*100)
holder.icon_state = "hud[percentage_health]"
holder.icon_state = RoundHealth((health-config.health_threshold_crit)/(maxHealth-config.health_threshold_crit)*100)
hud_list[HEALTH_HUD] = holder
if (BITTEST(hud_updateflag, LIFE_HUD))
+4
View File
@@ -0,0 +1,4 @@
author: PsiOmegaDelta
delete-after: True
changes:
- rscadd: "MedHUD overlays now have more stages, both for 'normal' and critical stages of injury, for improved quick-diagnosis."
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B