mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] pull through z-levels and map transits (#7429)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
@@ -93,7 +93,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
// pulled.forceMove(get_turf(counterpart))
|
||||
pulled.forceMove(counterpart.get_focused_turf())
|
||||
L.forceMove(counterpart.get_focused_turf())
|
||||
L.start_pulling(pulled)
|
||||
L.continue_pulling(pulled)
|
||||
else
|
||||
L.forceMove(counterpart.get_focused_turf())
|
||||
else
|
||||
|
||||
@@ -137,6 +137,17 @@
|
||||
. = ..()
|
||||
|
||||
if(edge && ticker?.mode && !density) // !density so 'fake' space turfs don't fling ghosts everywhere
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(L.pulling)
|
||||
var/atom/movable/pulled = L.pulling
|
||||
L.stop_pulling()
|
||||
A?.touch_map_edge()
|
||||
pulled.forceMove(L.loc)
|
||||
L.continue_pulling(pulled)
|
||||
else
|
||||
A?.touch_map_edge()
|
||||
else
|
||||
A?.touch_map_edge()
|
||||
|
||||
/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj)
|
||||
|
||||
@@ -621,6 +621,26 @@
|
||||
var/mob/pulled = AM
|
||||
pulled.inertia_dir = 0
|
||||
|
||||
// We have pulled something before, so we should be able to safely continue pulling it. This proc is only for portals!
|
||||
/mob/proc/continue_pulling(var/atom/movable/AM)
|
||||
|
||||
if ( !AM || src==AM || !isturf(src.loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort!
|
||||
return
|
||||
|
||||
if (AM.anchored)
|
||||
return
|
||||
|
||||
src.pulling = AM
|
||||
AM.pulledby = src
|
||||
|
||||
if(pullin)
|
||||
pullin.icon_state = "pull1"
|
||||
|
||||
//Attempted fix for people flying away through space when cuffed and dragged.
|
||||
if(ismob(AM))
|
||||
var/mob/pulled = AM
|
||||
pulled.inertia_dir = 0
|
||||
|
||||
/mob/proc/can_use_hands()
|
||||
return
|
||||
|
||||
|
||||
@@ -134,10 +134,18 @@
|
||||
if(!Move(destination))
|
||||
return 0
|
||||
if(isliving(src))
|
||||
var/list/atom/movable/pulling = list()
|
||||
var/mob/living/L = src
|
||||
if(L.pulling && !L.pulling.anchored)
|
||||
pulling |= L.pulling
|
||||
for(var/obj/item/weapon/grab/G in list(L.l_hand, L.r_hand))
|
||||
pulling |= G.affecting
|
||||
if(direction == UP)
|
||||
src.audible_message("<span class='notice'>[src] moves up.</span>")
|
||||
else if(direction == DOWN)
|
||||
src.audible_message("<span class='notice'>[src] moves down.</span>")
|
||||
for(var/atom/movable/P in pulling)
|
||||
P.forceMove(destination)
|
||||
return 1
|
||||
|
||||
/mob/proc/can_overcome_gravity()
|
||||
|
||||
Reference in New Issue
Block a user