[MIRROR] Issues with ears notify you once (#209)

* issues with ears notify only once (#52599)

* Issues with ears notify you once

Co-authored-by: NightRed <nightred@gmail.com>
This commit is contained in:
SkyratBot
2020-08-05 10:17:04 +02:00
committed by GitHub
co-authored by NightRed
parent eacfff54ca
commit 2db4448d85
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -28,6 +28,10 @@
var/damage_multiplier = 1
/obj/item/organ/ears/on_life()
// only inform when things got worse, needs to happen before we heal
if((damage > low_threshold && prev_damage < low_threshold) || (damage > high_threshold && prev_damage < high_threshold))
to_chat(owner, "<span class='warning'>The ringing in your ears grows louder, blocking out any external noises for a moment.</span>")
. = ..()
// if we have non-damage related deafness like mutations, quirks or clothing (earmuffs), don't bother processing here. Ear healing from earmuffs or chems happen elsewhere
if(HAS_TRAIT_NOT_FROM(owner, TRAIT_DEAF, EAR_DAMAGE))
@@ -43,7 +47,6 @@
if((damage > low_threshold) && prob(damage / 30))
adjustEarDamage(0, 4)
SEND_SOUND(owner, sound('sound/weapons/flash_ring.ogg'))
to_chat(owner, "<span class='warning'>The ringing in your ears grows louder, blocking out any external noises for a moment.</span>")
if(deaf)
ADD_TRAIT(owner, TRAIT_DEAF, EAR_DAMAGE)
@@ -97,7 +97,7 @@
var/healing_amount = -(maxHealth * healing_factor)
///Damage decrements again by a percent of its maxhealth, up to a total of 4 extra times depending on the owner's health
healing_amount -= owner.satiety > 0 ? 4 * healing_factor * owner.satiety / MAX_SATIETY : 0
applyOrganDamage(healing_amount)
applyOrganDamage(healing_amount, damage) // pass curent damage incase we are over cap
/obj/item/organ/examine(mob/user)
. = ..()