diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 7f592a2405b..77e31587c41 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -8,6 +8,7 @@ //var/darkness_view = 0//Base human is 2 //var/invisa_view = 0 var/prescription = 0 + var/see_darkness = 1 /obj/item/clothing/glasses/meson name = "Optical Meson Scanner" @@ -20,13 +21,14 @@ sprite_sheets = list( "Vox" = 'icons/mob/species/vox/eyes.dmi' ) - + /obj/item/clothing/glasses/meson/night name = "Night Vision Optical Meson Scanner" desc = "An Optical Meson Scanner fitted with an amplified visible light spectrum overlay, providing greater visual clarity in darkness." icon_state = "nvgmeson" item_state = "glasses" darkness_view = 8 + see_darkness = 0 /obj/item/clothing/glasses/meson/prescription name = "prescription mesons" @@ -49,7 +51,7 @@ desc = "nothing" icon_state = "purple" item_state = "glasses" - + /obj/item/clothing/glasses/janitor name = "Janitorial Goggles" desc = "These'll keep the soap out of your eyes." @@ -63,6 +65,7 @@ item_state = "glasses" origin_tech = "magnets=2" darkness_view = 8 + see_darkness = 0 species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/eyes.dmi' diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 47d9875c2a9..9a52deadebc 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -26,6 +26,7 @@ icon_state = "healthhudnight" item_state = "glasses" darkness_view = 8 + see_darkness = 0 /obj/item/clothing/glasses/hud/health/process_hud(var/mob/M) process_med_hud(M,1) @@ -53,6 +54,7 @@ desc = "An advanced heads-up display which provides id data and vision in complete darkness." icon_state = "securityhudnight" darkness_view = 8 + see_darkness = 0 /obj/item/clothing/glasses/hud/security/process_hud(var/mob/M) diff --git a/code/modules/clothing/spacesuits/space_ninja.dm b/code/modules/clothing/spacesuits/space_ninja.dm index 04ca1c56030..96d33a488ed 100644 --- a/code/modules/clothing/spacesuits/space_ninja.dm +++ b/code/modules/clothing/spacesuits/space_ninja.dm @@ -49,6 +49,7 @@ if(enabled) // If the Ninja's suit is on and connected. if(usr.mind.special_role != "Ninja") usr << "FĆAL �Rr�R: µ§er n¤t rec¤gnized, c-c¤ntr-r¤£§-£§ £¤cked." + return if(!user) // The user var is, so far as I can tell, required to refresh the window after each click. user = usr @@ -86,6 +87,7 @@ if(href_list["night"]) darkness_view = (darkness_view ? 0 : 8) + see_darkness = (darkness_view ? 0 : 1) energyConsumption += (darkness_view ? 2 : -2) usr << "Light amplification [(darkness_view ? "ENABLED" : "DISABLED")]." diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 4c03256ecb8..96898990afa 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1325,7 +1325,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc sight |= G.vision_flags if(!druggy) see_invisible = SEE_INVISIBLE_MINIMUM - if(istype(G,/obj/item/clothing/glasses/night)) + if(!G.see_darkness) see_invisible = SEE_INVISIBLE_MINIMUM /* HUD shit goes here, as long as it doesn't modify sight flags */ // The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl @@ -1341,9 +1341,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc var/obj/item/clothing/glasses/hud/O = glasses O.process_hud(src) if(!druggy) - see_invisible = SEE_INVISIBLE_LIVING - if(istype(O,/obj/item/clothing/glasses/hud/security/night) || istype(O,/obj/item/clothing/glasses/hud/health/night)) - see_invisible = SEE_INVISIBLE_MINIMUM + see_invisible = (O.see_darkness ? SEE_INVISIBLE_LIVING : SEE_INVISIBLE_MINIMUM) else if(!seer) see_in_dark = species.darksight see_invisible = SEE_INVISIBLE_LIVING