Medical HUD useability improvements (#413)

- bugfix: "Medical huds will now properly update as wounds heal
passively, or when bandaged"
- rscadd: "Added a new Medical HUD state between 70 and 100%, to better
recognise very small amounts of damage"
- rscadd: "Medical huds will no longer show the healthbar on crewmembers
who are at full health"
- rscadd: "Added a healthbar fadeout effect for when someone heals up to
100% while you're watching"
- tweak: "Medical huds now update more frequently"
This commit is contained in:
NanakoAC
2016-06-23 00:16:06 +01:00
committed by skull132
parent 8a4bf1d738
commit 6d0f8388a7
5 changed files with 62 additions and 4 deletions
+3 -1
View File
@@ -90,7 +90,9 @@ proc/RoundHealth(health)
switch(health)
if(100 to INFINITY)
return "health100"
if(70 to 100)
if(90 to 100)
return "health95"
if(70 to 90)
return "health80"
if(50 to 70)
return "health60"
+11 -2
View File
@@ -55,12 +55,13 @@
//TODO: seperate this out
// update the current life tick, can be used to e.g. only do something every 4 ticks
life_tick++
var/datum/gas_mixture/environment = loc.return_air()
in_stasis = istype(loc, /obj/structure/closet/body_bag/cryobag) && loc:opened == 0
if(in_stasis) loc:used++
if(life_tick%30==15)
if(life_tick%30==5)//Makes huds update every 10 seconds instead of every 30 seconds
hud_updateflag = 1022
voice = GetVoice()
@@ -1613,7 +1614,15 @@
holder.icon_state = "hudhealth-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]"
if (percentage_health == "health100" && holder.icon_state && holder.icon_state != "hudhealth100" && holder.icon_state != "hudhealth100a")
holder.icon_state = "hudhealth100a"
spawn(30)//just to prevent any issues with the animation, we'll set it to the normal state after 3 seconds
percentage_health = RoundHealth((health-config.health_threshold_crit)/(maxHealth-config.health_threshold_crit)*100)
if (percentage_health == "health100")
holder.icon_state = "hudhealth100"
else
holder.icon_state = "hud[percentage_health]"
hud_list[HEALTH_HUD] = holder
if (BITTEST(hud_updateflag, LIFE_HUD))
+7 -1
View File
@@ -559,7 +559,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if((status & ORGAN_ROBOT) || (status & ORGAN_ADV_ROBOT)) //Robotic limbs don't heal or get worse.
return
var/updatehud
for(var/datum/wound/W in wounds)
// wounds can disappear after 10 minutes at the earliest
if(W.damage <= 0 && W.created + 10 * 10 * 60 <= world.time)
@@ -567,6 +567,9 @@ Note that amputating the affected organ does in fact remove the infection from t
continue
// let the GC handle the deletion of the wound
if (W.damage > 0)
updatehud = 1//If there are any wounds with damage to heal, then we'll update health huds
// Internal wounds get worse over time. Low temperatures (cryo) stop them.
if(W.internal && owner.bodytemperature >= 170)
var/bicardose = owner.reagents.get_reagent_amount("bicaridine")
@@ -604,6 +607,9 @@ Note that amputating the affected organ does in fact remove the infection from t
// sync the organ's damage with its wounds
src.update_damages()
if (updatehud)
owner.hud_updateflag = 1022
if (update_icon())
owner.UpdateDamageIcon(1)
+41
View File
@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: Nanako
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Medical huds will now properly update as wounds heal passively, or when bandaged"
- rscadd: "Added a new Medical HUD state between 70 and 100%, to better recognise very small amounts of damage"
- rscadd: "Medical huds will no longer show the healthbar on crewmembers who are at full health"
- rscadd: "Added a healthbar fadeout effect for when someone heals up to 100% while you're watching"
- tweak: "Medical huds now update more frequently"
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB