diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
index 34a2d67b58b..d6062a02c5d 100644
--- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
+++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
@@ -76,11 +76,11 @@
var/mob/living/carbon/human/H = owner
H.weakeyes = 1
if(!H.vision_type)
- H.vision_type = new /datum/vision_override/nightvision
+ H.set_sight(/datum/vision_override/nightvision)
/obj/item/organ/internal/cyberimp/eyes/thermals/ling/remove(mob/living/carbon/M, special = 0)
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.weakeyes = 0
- H.vision_type = null
+ H.set_sight(null)
..()
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index 2cafb1bc219..27267d2ec02 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -175,7 +175,6 @@
range = -1
include_user = 1
clothes_req = 0
- var/datum/vision_override/vision_path = /datum/vision_override/nightvision
action_icon_state = "darksight"
/obj/effect/proc_holder/spell/targeted/shadow_vision/cast(list/targets, mob/user = usr)
@@ -185,10 +184,10 @@
var/mob/living/carbon/human/H = target
if(!H.vision_type)
to_chat(H, "You shift the nerves in your eyes, allowing you to see in the dark.")
- H.vision_type = new vision_path
+ H.set_sight(/datum/vision_override/nightvision)
else
to_chat(H, "You return your vision to normal.")
- H.vision_type = null
+ H.set_sight(null)
/obj/effect/proc_holder/spell/targeted/shadow_vision/thrall
desc = "Thrall Darksight"
diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm
index 63f062b8bc8..be2a7f44229 100644
--- a/code/modules/mob/living/carbon/human/species/shadow.dm
+++ b/code/modules/mob/living/carbon/human/species/shadow.dm
@@ -39,10 +39,10 @@
/datum/action/innate/shadow/darkvision/Activate()
var/mob/living/carbon/human/H = owner
if(!H.vision_type)
- H.vision_type = new /datum/vision_override/nightvision
+ H.set_sight(/datum/vision_override/nightvision)
to_chat(H, "You adjust your vision to pierce the darkness.")
else
- H.vision_type = null
+ H.set_sight(null)
to_chat(H, "You adjust your vision to recognize the shadows.")
/datum/species/shadow/on_species_gain(mob/living/carbon/human/H)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 46f80bc1919..e4e0a098b07 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -1357,6 +1357,12 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT)
sync_lighting_plane_alpha()
+/mob/proc/set_sight(datum/vision_override/O)
+ QDEL_NULL(vision_type)
+ if(O) //in case of null
+ vision_type = new O
+ update_sight()
+
/mob/proc/sync_lighting_plane_alpha()
if(hud_used)
var/obj/screen/plane_master/lighting/L = hud_used.plane_masters["[LIGHTING_PLANE]"]
diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm
index b2bd8e6acd8..59274fb0c19 100644
--- a/code/modules/surgery/other.dm
+++ b/code/modules/surgery/other.dm
@@ -327,7 +327,7 @@
user.visible_message("[user] shines light onto the tumor in [target]'s [E]!", "You cleanse the contamination from [target]'s brain!")
if(target.vision_type) //Turns off their darksight if it's still active.
to_chat(target, "Your eyes are suddenly wrought with immense pain as your darksight is forcibly dismissed!")
- target.vision_type = null
+ target.set_sight(null)
SSticker.mode.remove_thrall(target.mind, 0)
target.visible_message("A strange black mass falls from [target]'s [E]!")
var/obj/item/organ/thing = new /obj/item/organ/internal/shadowtumor(get_turf(target))