From bd5856adf040fabfb0cc0a9e2dbd7b26f6cef47f Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Sun, 14 Jan 2018 19:26:07 -0500 Subject: [PATCH] POLARIS: Fix RIG visors with new plane system, and material scanner VIS_FULLBRIGHT --- code/modules/clothing/glasses/glasses.dm | 2 ++ code/modules/clothing/spacesuits/rig/modules/vision.dm | 8 ++++++++ code/modules/mob/living/carbon/human/human_helpers.dm | 8 ++++++++ 3 files changed, 18 insertions(+) diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 31452ff50d..c6528a109e 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -189,6 +189,8 @@ BLIND // can't see anything toggleable = 1 action_button_name = "Toggle Goggles" vision_flags = SEE_OBJS + enables_planes = list(VIS_FULLBRIGHT) + /obj/item/clothing/glasses/material/prescription name = "prescription optical material scanner" diff --git a/code/modules/clothing/spacesuits/rig/modules/vision.dm b/code/modules/clothing/spacesuits/rig/modules/vision.dm index ddff6aefe0..572f861d5a 100644 --- a/code/modules/clothing/spacesuits/rig/modules/vision.dm +++ b/code/modules/clothing/spacesuits/rig/modules/vision.dm @@ -175,6 +175,14 @@ holder.wearer << "Your sensors only have one mode." return 1 +/obj/item/rig_module/vision/activate() + if((. = ..()) && holder.wearer) + holder.wearer.recalculate_vis() + +/obj/item/rig_module/vision/deactivate() + if((. = ..()) && holder.wearer) + holder.wearer.recalculate_vis() + /obj/item/rig_module/vision/New() ..() diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 9e1497bb06..642fb3bcf6 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -138,6 +138,14 @@ if(O && O.enables_planes && (slot in O.plane_slots)) compiled_vis |= O.enables_planes + //Check to see if we have a rig (ugh, blame rigs, desnowflake this) + var/obj/item/weapon/rig/rig = back + if(istype(rig) && rig.visor) + if(!rig.helmet || (head && rig.helmet == head)) + if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses) + var/obj/item/clothing/glasses/V = rig.visor.vision.glasses + compiled_vis |= V.enables_planes + //VOREStation Add - NIF Support if(nif) compiled_vis |= nif.planes_visible