diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm index 34a2d67b58b..bd06954a505 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(new /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 e763d3ec6e9..e210fb61fda 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -187,7 +187,7 @@ H.set_sight(new /datum/vision_override/nightvision) else to_chat(H, "You return your vision to normal.") - H.set_sight() + 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 2a850f56494..25d3c853368 100644 --- a/code/modules/mob/living/carbon/human/species/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/shadow.dm @@ -42,7 +42,7 @@ H.set_sight(new /datum/vision_override/nightvision) to_chat(H, "You adjust your vision to pierce the darkness.") else - H.set_sight() + 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 b2d24818d43..370c1fae76e 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1357,6 +1357,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ sync_lighting_plane_alpha() /mob/proc/set_sight(datum/vision_override/O) + if(vision_type) + qdel(vision_type) //qdel the old vision_type unless it is null. vision_type = O update_sight() 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))