[MIRROR] removes a useless check from organs and fixes maint eyes permanent blindness (#8271)

* removes a useless check from organs and fixes maint eyes permanent blindness (#61541)

* removes a useless check from organs and fixes maint eyes permanent blindness

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-09-19 15:51:49 +01:00
committed by GitHub
co-authored by John Willard
parent 033fca0b7b
commit 31ad5a662c
3 changed files with 5 additions and 10 deletions
+1 -1
View File
@@ -208,7 +208,7 @@
if(victim.flags_1 & IS_SPINNING_1)
return DEVIATION_NONE
if(HAS_TRAIT(victim, TRAIT_FLASH_SENSITIVE)) //Basically if you have Flypeople eyes
if(HAS_TRAIT(victim, TRAIT_FLASH_SENSITIVE)) //If your eyes are sensitive and can be flashed from any direction.
return DEVIATION_NONE
// Are they on the same tile? We'll return partial deviation. This may be someone flashing while lying down
-3
View File
@@ -37,9 +37,6 @@
if(HAS_TRAIT_NOT_FROM(owner, TRAIT_DEAF, EAR_DAMAGE))
return
if((damage < maxHealth) && (organ_flags & ORGAN_FAILING)) //ear damage can be repaired from the failing condition
organ_flags &= ~ORGAN_FAILING
if((organ_flags & ORGAN_FAILING))
deaf = max(deaf, 1) // if we're failing we always have at least 1 deaf stack (and thus deafness)
else // only clear deaf stacks if we're not failing
+4 -6
View File
@@ -31,7 +31,8 @@
var/see_invisible = SEE_INVISIBLE_LIVING
var/lighting_alpha
var/no_glasses
var/damaged = FALSE //damaged indicates that our eyes are undergoing some level of negative effect
/// indication that the eyes are undergoing some negative effect
var/damaged = FALSE
/obj/item/organ/eyes/Insert(mob/living/carbon/eye_owner, special = FALSE, drop_if_replaced = FALSE, initialising)
. = ..()
@@ -83,12 +84,8 @@
/obj/item/organ/eyes/on_life(delta_time, times_fired)
..()
. = ..()
var/mob/living/carbon/eye_owner = owner
//since we can repair fully damaged eyes, check if healing has occurred
if((organ_flags & ORGAN_FAILING) && (damage < maxHealth))
organ_flags &= ~ORGAN_FAILING
eye_owner.cure_blind(EYE_DAMAGE)
//various degrees of "oh fuck my eyes", from "point a laser at your eye" to "staring at the Sun" intensities
if(damage > 20)
damaged = TRUE
@@ -102,6 +99,7 @@
else if(damaged)
damaged = FALSE
eye_owner.clear_fullscreen("eye_damage")
eye_owner.cure_blind(EYE_DAMAGE)
return
/obj/item/organ/eyes/night_vision