From c4dbcfffe81152805d0d5da9c3668f41502337de Mon Sep 17 00:00:00 2001 From: ShadowLarkens Date: Thu, 10 Sep 2020 16:39:27 -0700 Subject: [PATCH] Fix nearsighted overlay getting stuck on --- code/modules/mob/living/carbon/human/life.dm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 39ad53458bc..fbf1b76b90f 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1290,13 +1290,19 @@ clear_fullscreen("blind") clear_alert("blind") - if(disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription - if(glasses) //to every /obj/item + var/apply_nearsighted_overlay = FALSE + if(disabilities & NEARSIGHTED) + apply_nearsighted_overlay = TRUE + + if(glasses) var/obj/item/clothing/glasses/G = glasses - if(!G.prescription) - set_fullscreen(disabilities & NEARSIGHTED, "impaired", /obj/screen/fullscreen/impaired, 1) - else if (!nif || !nif.flag_check(NIF_V_CORRECTIVE,NIF_FLAGS_VISION)) //VOREStation Edit - NIF - set_fullscreen(disabilities & NEARSIGHTED, "impaired", /obj/screen/fullscreen/impaired, 1) + if(G.prescription) + apply_nearsighted_overlay = FALSE + + if(nif && nif.flag_check(NIF_V_CORRECTIVE, NIF_FLAGS_VISION)) // VOREStation Edit - NIF + apply_nearsighted_overlay = FALSE + + set_fullscreen(apply_nearsighted_overlay, "nearsighted", /obj/screen/fullscreen/impaired, 1) set_fullscreen(eye_blurry, "blurry", /obj/screen/fullscreen/blurry) set_fullscreen(druggy, "high", /obj/screen/fullscreen/high)