Replaces HEALS_EARS_2 with a component, adds a wearertargeting parent component for future use

This commit is contained in:
vuonojenmustaturska
2018-04-30 01:32:59 +03:00
committed by CitadelStationBot
parent e66e348d5c
commit ec2de88a65
8 changed files with 115 additions and 13 deletions
+3 -8
View File
@@ -27,14 +27,9 @@
// genetic deafness prevents the body from using the ears, even if healthy
if(C.has_trait(TRAIT_DEAF))
deaf = max(deaf, 1)
else
if(C.ears && (C.ears.flags_2 & HEALS_EARS_2))
deaf = max(deaf - 1, 1)
ear_damage = max(ear_damage - 0.1, 0)
// if higher than UNHEALING_EAR_DAMAGE, no natural healing occurs.
if(ear_damage < UNHEALING_EAR_DAMAGE)
ear_damage = max(ear_damage - 0.05, 0)
deaf = max(deaf - 1, 0)
else if(ear_damage < UNHEALING_EAR_DAMAGE) // if higher than UNHEALING_EAR_DAMAGE, no natural healing occurs.
ear_damage = max(ear_damage - 0.05, 0)
deaf = max(deaf - 1, 0)
/obj/item/organ/ears/proc/restoreEars()
deaf = 0