fixes wormhole jaunter portals floating in space. (#61089)

This commit is contained in:
Ghom
2021-08-31 07:06:14 +02:00
committed by GitHub
parent fda603419c
commit 87cdc9042e
2 changed files with 4 additions and 3 deletions
+3
View File
@@ -47,6 +47,9 @@
return FALSE
return ..()
/obj/effect/portal/newtonian_move() // Prevents portals spawned by jaunter/handtele from floating into space when relocated to an adjacent tile.
return TRUE
/obj/effect/portal/attackby(obj/item/W, mob/user, params)
if(user && Adjacent(user))
teleport(user)
+1 -3
View File
@@ -253,9 +253,7 @@
RegisterSignal(portal1, COMSIG_PARENT_QDELETING, .proc/on_portal_destroy)
RegisterSignal(portal2, COMSIG_PARENT_QDELETING, .proc/on_portal_destroy)
var/turf/check_turf = get_turf(get_step(user, user.dir))
if(check_turf.CanPass(user, get_dir(check_turf, user)))
portal1.forceMove(check_turf)
try_move_adjacent(portal1, user.dir)
active_portal_pairs[portal1] = portal2
investigate_log("was used by [key_name(user)] at [AREACOORD(user)] to create a portal pair with destinations [AREACOORD(portal1)] and [AREACOORD(portal2)].", INVESTIGATE_PORTAL)