From f655f4da3f6d41de3fedbe08580959856b71ffde Mon Sep 17 00:00:00 2001 From: X0-11 Date: Mon, 3 Jun 2024 18:46:04 +0100 Subject: [PATCH] virtual mob tweak revert --- code/modules/mob/observer/virtual/base.dm | 11 ++++++----- maps/_gamemodes/firefight/overmind.dm | 2 +- test/check-paths.sh | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/observer/virtual/base.dm b/code/modules/mob/observer/virtual/base.dm index 762ec2107ad7c..dbeff1bf39ef2 100644 --- a/code/modules/mob/observer/virtual/base.dm +++ b/code/modules/mob/observer/virtual/base.dm @@ -57,8 +57,11 @@ var/list/all_virtual_listeners = list() /atom/movable/Initialize() . = ..() - if(shall_have_virtual_mob()) - virtual_mob = new virtual_mob(get_turf(src), src) + if(ispath(virtual_mob)) + if(shall_have_virtual_mob()) + virtual_mob = new virtual_mob(get_turf(src), src) + else + virtual_mob = null /atom/movable/Destroy() if(virtual_mob && !ispath(virtual_mob)) @@ -70,6 +73,4 @@ var/list/all_virtual_listeners = list() return TRUE /mob/shall_have_virtual_mob() - var/init_virt = initial(virtual_mob) - if(!isnull(init_virt)) - return ispath(init_virt) + return (src in GLOB.mob_list) diff --git a/maps/_gamemodes/firefight/overmind.dm b/maps/_gamemodes/firefight/overmind.dm index a14c2d962c53d..c27f5a0415218 100644 --- a/maps/_gamemodes/firefight/overmind.dm +++ b/maps/_gamemodes/firefight/overmind.dm @@ -11,7 +11,7 @@ /datum/npc_overmind/firefight/New() . = ..() -START_PROCESSING(SSobj, src) + START_PROCESSING(SSobj, src) /datum/npc_overmind/firefight/create_taskpoint_assign() //intentionally left blank diff --git a/test/check-paths.sh b/test/check-paths.sh index 3122b8d66bfd3..53e2cc24e2499 100755 --- a/test/check-paths.sh +++ b/test/check-paths.sh @@ -2,7 +2,7 @@ set -e WORLD_LOG_COUNT=40 -ANGLE_BRACKET_COUNT=730 +ANGLE_BRACKET_COUNT=731 FAILED=0