Merge pull request #10053 from Ghommie/Ghommie-cit429

Fixes some means of eyes blindness not working, removes legacy code.
This commit is contained in:
Putnam3145
2019-12-09 12:40:37 -08:00
committed by GitHub
15 changed files with 50 additions and 90 deletions
@@ -199,17 +199,17 @@ All effects don't start immediately, but rather get worse over time; the rate is
to_chat(M, "<span class='notice'>[pick("You have a really bad headache.", "Your eyes hurt.", "You find it hard to stay still.", "You feel your heart practically beating out of your chest.")]</span>")
if(prob(5) && iscarbon(M))
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
if(HAS_TRAIT(M, TRAIT_BLIND))
var/obj/item/organ/eyes/eye = M.getorganslot(ORGAN_SLOT_EYES)
if(istype(eye))
eye.Remove(M)
eye.forceMove(get_turf(M))
if(eyes)
eyes.Remove(M)
eyes.forceMove(get_turf(M))
to_chat(M, "<span class='userdanger'>You double over in pain as you feel your eyeballs liquify in your head!</span>")
M.emote("scream")
M.adjustBruteLoss(15)
else
to_chat(M, "<span class='userdanger'>You scream in terror as you go blind!</span>")
M.become_blind(EYE_DAMAGE)
eyes?.applyOrganDamage(eyes.maxHealth)
M.emote("scream")
if(prob(3) && iscarbon(M))
@@ -793,6 +793,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
eyes.applyOrganDamage(-2)
if(HAS_TRAIT_FROM(M, TRAIT_BLIND, EYE_DAMAGE))
if(prob(20))
to_chat(M, "<span class='warning'>Your vision slowly returns...</span>")
@@ -807,8 +808,6 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
else if(M.eye_blind || M.eye_blurry)
M.set_blindness(0)
M.set_blurriness(0)
else if(eyes.eye_damage > 0)
M.adjust_eye_damage(-1)
..()
/datum/reagent/medicine/atropine