Merge pull request #2528 from tigercat2000/visionnnnnnnnnnnnnnnnnnn

Fix Vision code weirdness
This commit is contained in:
Fox McCloud
2015-11-12 21:05:03 -05:00
2 changed files with 22 additions and 9 deletions
+1 -1
View File
@@ -53,6 +53,7 @@
vision_flags = SEE_TURFS
prescription_upgradable = 1
species_fit = list("Vox")
see_darkness = 0 //don't render darkness while wearing mesons
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
@@ -63,7 +64,6 @@
icon_state = "nvgmeson"
item_state = "glasses"
darkness_view = 8
see_darkness = 0
prescription_upgradable = 0
/obj/item/clothing/glasses/meson/prescription
@@ -376,18 +376,25 @@
else
H.sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
H.see_in_dark = darksight //set their variables to default, modify them later
H.see_invisible = SEE_INVISIBLE_LIVING
if(H.mind && H.mind.vampire)
if(VAMP_VISION in H.mind.vampire.powers && !(VAMP_FULL in H.mind.vampire.powers))
H.sight |= SEE_MOBS
else if(VAMP_FULL in H.mind.vampire.powers)
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
H.see_in_dark = 8
if(!H.druggy) H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
H.see_invisible = SEE_INVISIBLE_MINIMUM
if(XRAY in H.mutations)
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
H.see_in_dark = 8
if(!H.druggy) H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
H.see_invisible = SEE_INVISIBLE_MINIMUM
if(H.seer == 1)
var/obj/effect/rune/R = locate() in H.loc
@@ -397,11 +404,7 @@
H.see_invisible = SEE_INVISIBLE_LIVING
H.seer = 0
else if(!H.seer)
H.see_in_dark = darksight
H.see_invisible = SEE_INVISIBLE_LIVING
// This checks how much the mob's eyewear impairs their vision
//This checks how much the mob's eyewear impairs their vision
if(H.tinttotal >= TINT_IMPAIR)
if(tinted_weldhelh)
if(H.tinttotal >= TINT_BLIND)
@@ -413,7 +416,9 @@
if(istype(H.glasses, /obj/item/clothing/glasses))
var/obj/item/clothing/glasses/G = H.glasses
H.sight |= G.vision_flags
H.see_in_dark = G.darkness_view
if(G.darkness_view)
H.see_in_dark = G.darkness_view
if(!G.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
@@ -442,6 +447,14 @@
if(ANTAGHUD)
process_antag_hud(H)
if(H.vision_type)
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight)
H.see_invisible = H.vision_type.see_invisible
if(H.vision_type.light_sensitive)
H.weakeyes = 1
H.sight |= H.vision_type.sight_flags
if(H.see_override) //Override all
H.see_invisible = H.see_override