Revenant nightvision fix

This commit is contained in:
Markolie
2017-03-12 20:59:28 +01:00
parent 255a6a1c17
commit 4edf69c3c0
4 changed files with 15 additions and 16 deletions
@@ -39,6 +39,7 @@
search_objects = 1 // So that it can see through walls
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
sight = SEE_SELF|SEE_MOBS|SEE_OBJS|SEE_TURFS
anchored = 1
status_flags = GODMODE // Cannot push also
@@ -56,9 +57,6 @@
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blindness(null))
AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision(null))
// Give nightvision
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
// Set creator
if(creator)
src.creator = creator
@@ -190,7 +188,7 @@
//Toggle Night Vision
/obj/effect/proc_holder/spell/targeted/night_vision
name = "Toggle Nightvision \[ON\]"
name = "Toggle Nightvision"
desc = "Toggle your nightvision mode."
charge_max = 10
@@ -199,17 +197,15 @@
message = "<span class='notice'>You toggle your night vision!</span>"
range = -1
include_user = 1
var/non_night_vision = SEE_INVISIBLE_LIVING
var/night_vision = SEE_INVISIBLE_OBSERVER_NOLIGHTING
/obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
if(target.see_invisible == SEE_INVISIBLE_LIVING)
target.see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
name = "Toggle Nightvision \[ON\]"
if(target.see_invisible == non_night_vision)
target.see_invisible = night_vision
else
target.see_invisible = SEE_INVISIBLE_LIVING
name = "Toggle Nightvision \[OFF\]"
return
target.see_invisible = non_night_vision
/mob/living/simple_animal/hostile/statue/sentience_act()
faction -= "neutral"
@@ -712,16 +712,17 @@
/mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion
return
/mob/living/simple_animal/update_sight()
/mob/living/simple_animal/update_sight(reset_sight = FALSE)
if(!client)
return
if(stat == DEAD)
grant_death_vision()
return
see_invisible = initial(see_invisible)
see_in_dark = initial(see_in_dark)
sight = initial(sight)
if(reset_sight)
see_invisible = initial(see_invisible)
see_in_dark = initial(see_in_dark)
sight = initial(sight)
if(client.eye != src)
var/atom/A = client.eye