Adds Vision Flags for Helmets

This commit is contained in:
SamCroswell
2015-06-11 23:15:42 -04:00
parent dcc0128a54
commit 4e3f4bfa17
6 changed files with 72 additions and 18 deletions
+37 -17
View File
@@ -1179,24 +1179,44 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
see_invisible = SEE_INVISIBLE_LIVING
seer = 0
if(glasses)
var/obj/item/clothing/glasses/G = glasses
if(istype(G))
see_in_dark = (G.darkness_view ? see_in_dark + G.darkness_view : species.darksight) // Otherwise we keep our darkness view with togglable nightvision.
if(G.vision_flags) // MESONS
sight |= G.vision_flags
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
if(glasses || head)
if(glasses)
var/obj/item/clothing/glasses/G = glasses
if(istype(G))
see_in_dark = (G.darkness_view ? see_in_dark + G.darkness_view : species.darksight) // Otherwise we keep our darkness view with togglable nightvision.
if(G.vision_flags) // MESONS
sight |= G.vision_flags
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
switch(G.HUDType)
if(SECHUD)
process_sec_hud(src,1)
if(MEDHUD)
process_med_hud(src,1)
if(ANTAGHUD)
process_antag_hud(src)
if(head)
var/obj/item/clothing/head/H = head
if(istype(H))
if(H.vision_flags) // MESONS
sight |= H.vision_flags
if(!H.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
switch(H.HUDType)
if(SECHUD)
process_sec_hud(src,1)
if(MEDHUD)
process_med_hud(src,1)
if(ANTAGHUD)
process_antag_hud(src)
switch(G.HUDType)
if(SECHUD)
process_sec_hud(src,1)
if(MEDHUD)
process_med_hud(src,1)
if(ANTAGHUD)
process_antag_hud(src)