POLARIS: Fix RIG visors with new plane system, and material scanner VIS_FULLBRIGHT

This commit is contained in:
Arokha Sieyes
2018-01-14 19:26:07 -05:00
parent f94202f98e
commit bd5856adf0
3 changed files with 18 additions and 0 deletions
+2
View File
@@ -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"
@@ -175,6 +175,14 @@
holder.wearer << "<font color='blue'>Your sensors only have one mode.</font>"
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()
..()
@@ -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