diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm index 7eb4f1eebac..fb25c4401c0 100644 --- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm +++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm @@ -9,7 +9,9 @@ dna_cost = 2 //Would be 1 without thermal vision var/active = 0 //Whether or not vision is enhanced -/obj/effect/proc_holder/changeling/augmented_eyesight/sting_action(mob/user) +/obj/effect/proc_holder/changeling/augmented_eyesight/sting_action(mob/living/carbon/human/user) + if(!istype(user)) + return active = !active if(active) user << "We feel a minute twitch in our eyes, and darkness creeps away." @@ -17,12 +19,12 @@ user.sight |= SEE_MOBS user.permanent_sight_flags |= SEE_MOBS user.see_in_dark = 8 - user.see_invisible = SEE_INVISIBLE_MINIMUM + user.dna.species.invis_sight = SEE_INVISIBLE_MINIMUM else user << "Our vision dulls. Shadows gather." user.weakeyes = 0 - user.sight -= SEE_MOBS - user.permanent_sight_flags -= SEE_MOBS + user.sight &= ~SEE_MOBS + user.permanent_sight_flags &= ~SEE_MOBS user.see_in_dark = 0 - user.see_invisible = SEE_INVISIBLE_LIVING + user.dna.species.invis_sight = initial(user.dna.species.invis_sight) return 1 diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 9d5fc402615..8ff2d451a10 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -198,10 +198,19 @@ /obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets) 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(istype(target, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = target + if(H.dna.species.invis_sight == SEE_INVISIBLE_LIVING) + H.dna.species.invis_sight = SEE_INVISIBLE_OBSERVER_NOLIGHTING + name = "Toggle Nightvision \[ON]" + else + H.dna.species.invis_sight = SEE_INVISIBLE_LIVING + name = "Toggle Nightvision \[OFF]" + else - target.see_invisible = SEE_INVISIBLE_LIVING - name = "Toggle Nightvision \[OFF\]" - return \ No newline at end of file + if(target.see_invisible == SEE_INVISIBLE_LIVING) + target.see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING + name = "Toggle Nightvision \[ON]" + else + target.see_invisible = SEE_INVISIBLE_LIVING + name = "Toggle Nightvision \[OFF]" diff --git a/html/changelogs/xxalpha-changeling_vision.yml b/html/changelogs/xxalpha-changeling_vision.yml new file mode 100644 index 00000000000..94ab8979902 --- /dev/null +++ b/html/changelogs/xxalpha-changeling_vision.yml @@ -0,0 +1,6 @@ +author: xxalpha + +delete-after: True + +changes: + - bugfix: "Changeling augmented eyesight night vision is now working."