From 54e7ad7ad5432b66ec37eb3ccb4a163afc7cd390 Mon Sep 17 00:00:00 2001 From: kyunkyunkyun <120701975+kyunkyunkyun@users.noreply.github.com> Date: Wed, 1 Oct 2025 20:40:27 +0500 Subject: [PATCH] Fix observe runtime (#30437) * fix * keep update_sight() --- code/datums/vision_override.dm | 10 ---------- code/modules/mob/dead/observer/observer_base.dm | 2 +- .../mob/living/carbon/human/species/_species.dm | 7 ------- code/modules/mob/mob.dm | 6 ------ code/modules/mob/mob_vars.dm | 2 -- paradise.dme | 1 - 6 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 code/datums/vision_override.dm diff --git a/code/datums/vision_override.dm b/code/datums/vision_override.dm deleted file mode 100644 index e110daafd53..00000000000 --- a/code/datums/vision_override.dm +++ /dev/null @@ -1,10 +0,0 @@ -/datum/vision_override - var/name = "vision override" - - var/sight_flags = 0 - var/see_in_dark = 0 - var/lighting_alpha - -/datum/vision_override/nightvision - see_in_dark = 8 - lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE diff --git a/code/modules/mob/dead/observer/observer_base.dm b/code/modules/mob/dead/observer/observer_base.dm index 3b0210c1974..341fd29a9e2 100644 --- a/code/modules/mob/dead/observer/observer_base.dm +++ b/code/modules/mob/dead/observer/observer_base.dm @@ -866,7 +866,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp mob_observed = null reset_perspective(null) client?.perspective = initial(client.perspective) - set_sight(initial(sight)) + update_sight() UnregisterSignal(src, COMSIG_ATOM_ORBITER_STOP) if(s_active) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 2c820e2156c..eb989b06f06 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -1045,13 +1045,6 @@ It'll return null if the organ doesn't correspond, so include null checks when u if(!isnull(hat.lighting_alpha)) H.lighting_alpha = min(hat.lighting_alpha, H.lighting_alpha) - if(H.vision_type) - H.sight |= H.vision_type.sight_flags - H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark) - - if(!isnull(H.vision_type.lighting_alpha)) - H.lighting_alpha = min(H.vision_type.lighting_alpha, H.lighting_alpha) - if(HAS_TRAIT(H, TRAIT_MESON_VISION)) H.sight |= SEE_TURFS H.lighting_alpha = min(H.lighting_alpha, LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index b979a62c0f9..dfc14c00061 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1353,12 +1353,6 @@ 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/atom/movable/screen/plane_master/lighting/L = hud_used.plane_masters["[LIGHTING_PLANE]"] diff --git a/code/modules/mob/mob_vars.dm b/code/modules/mob/mob_vars.dm index a68a5492df1..5baa4b34c98 100644 --- a/code/modules/mob/mob_vars.dm +++ b/code/modules/mob/mob_vars.dm @@ -183,8 +183,6 @@ var/resize = 1 //Badminnery resize - var/datum/vision_override/vision_type = null //Vision override datum. - var/list/permanent_huds = list() var/list/actions = list() diff --git a/paradise.dme b/paradise.dme index 4d167b3eb9c..1e1b88e96bb 100644 --- a/paradise.dme +++ b/paradise.dme @@ -447,7 +447,6 @@ #include "code\datums\station_state.dm" #include "code\datums\tgs_event_handler.dm" #include "code\datums\verb_callbacks.dm" -#include "code\datums\vision_override.dm" #include "code\datums\vv_core_topics.dm" #include "code\datums\actions\action.dm" #include "code\datums\actions\cooldown_action.dm"