From 4413b8e6d38f1798983be952310a7a331ae07458 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Fri, 6 Sep 2024 18:08:09 +0300 Subject: [PATCH 1/2] Update portal.dm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit теперь порталы работают более незаметно --- mods/_fd/polaris_portals/code/portal.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/_fd/polaris_portals/code/portal.dm b/mods/_fd/polaris_portals/code/portal.dm index 867fafa761ca0..60a0e3e6896dd 100644 --- a/mods/_fd/polaris_portals/code/portal.dm +++ b/mods/_fd/polaris_portals/code/portal.dm @@ -202,7 +202,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/turf/T = P.counterpart.get_focused_turf() P.vis_contents += T - var/list/things = dview(world.view, T) + var/list/things = dview(8, T) for(var/turf/turf in things) if(!(get_dir(turf, T) & GLOB.reverse_dir[P.dir])) //dont grab things behind but sides should be fine if(turf in observed_turfs) // Avoid showing the same turf twice or more for improved performance. @@ -230,7 +230,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/turf/T = counterpart.get_focused_turf() var/list/mobs_to_relay = list() var/list/objs = list() - get_mobs_and_objs_in_view_fast(T, world.view, mobs_to_relay, objs, checkghosts = FALSE) + get_mobs_and_objs_in_view_fast(T, 8, mobs_to_relay, objs, checkghosts = FALSE) for(var/thing in mobs_to_relay) var/mob/mob = thing @@ -246,7 +246,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/turf/T = counterpart.get_focused_turf() var/list/mobs_to_relay = list() var/list/objs = list() - get_mobs_and_objs_in_view_fast(T, world.view, mobs_to_relay, objs, checkghosts = FALSE) + get_mobs_and_objs_in_view_fast(T, 8, mobs_to_relay, objs, checkghosts = FALSE) for(var/thing in mobs_to_relay) var/mob/mob = thing @@ -262,7 +262,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/turf/T = counterpart.get_focused_turf() var/list/mobs_to_relay = list() var/list/objs = list() - get_mobs_and_objs_in_view_fast(T, world.view, mobs_to_relay, objs, checkghosts = FALSE) + get_mobs_and_objs_in_view_fast(T, 8, mobs_to_relay, objs, checkghosts = FALSE) for(var/thing in mobs_to_relay) var/mob/mob = thing From 71c814e5fedaeac322d4763ae852a4f249a785c1 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Sat, 7 Sep 2024 05:45:01 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=9F=D0=BB=D0=B0=D0=B2=D0=BD=D0=BE=D0=B5?= =?UTF-8?q?=20=D1=85=D0=BE=D0=B6=D0=B4=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D0=BF=D0=BE=D1=80=D1=82=D0=B0=D0=BB=D0=B0=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mods/_fd/polaris_portals/code/portal.dm | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/mods/_fd/polaris_portals/code/portal.dm b/mods/_fd/polaris_portals/code/portal.dm index 60a0e3e6896dd..339ab1c86cef5 100644 --- a/mods/_fd/polaris_portals/code/portal.dm +++ b/mods/_fd/polaris_portals/code/portal.dm @@ -71,11 +71,22 @@ when portals are shortly lived, or when portals are made to be obvious with spec ..() if(!AM) return + if(!counterpart) return - go_through_portal(AM) + if(isliving(AM)) + var/mob/M = AM + + var/datum/movement_handler/mob/delay/MH = M.GetMovementHandler(/datum/movement_handler/mob/delay) + MH.AddDelay(1) + spawn(M.movement_delay()) + go_through_portal(M) + + return + + go_through_portal(AM) /obj/map_effect/portal/proc/go_through_portal(atom/movable/AM) var/turf/T = counterpart.get_focused_turf() @@ -202,7 +213,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/turf/T = P.counterpart.get_focused_turf() P.vis_contents += T - var/list/things = dview(8, T) + var/list/things = dview(9, T) for(var/turf/turf in things) if(!(get_dir(turf, T) & GLOB.reverse_dir[P.dir])) //dont grab things behind but sides should be fine if(turf in observed_turfs) // Avoid showing the same turf twice or more for improved performance. @@ -230,7 +241,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/turf/T = counterpart.get_focused_turf() var/list/mobs_to_relay = list() var/list/objs = list() - get_mobs_and_objs_in_view_fast(T, 8, mobs_to_relay, objs, checkghosts = FALSE) + get_mobs_and_objs_in_view_fast(T, 9, mobs_to_relay, objs, checkghosts = FALSE) for(var/thing in mobs_to_relay) var/mob/mob = thing @@ -246,7 +257,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/turf/T = counterpart.get_focused_turf() var/list/mobs_to_relay = list() var/list/objs = list() - get_mobs_and_objs_in_view_fast(T, 8, mobs_to_relay, objs, checkghosts = FALSE) + get_mobs_and_objs_in_view_fast(T, 9, mobs_to_relay, objs, checkghosts = FALSE) for(var/thing in mobs_to_relay) var/mob/mob = thing @@ -262,7 +273,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec var/turf/T = counterpart.get_focused_turf() var/list/mobs_to_relay = list() var/list/objs = list() - get_mobs_and_objs_in_view_fast(T, 8, mobs_to_relay, objs, checkghosts = FALSE) + get_mobs_and_objs_in_view_fast(T, 9, mobs_to_relay, objs, checkghosts = FALSE) for(var/thing in mobs_to_relay) var/mob/mob = thing