mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +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
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
/turf/space/proc/toggle_transit(var/direction)
|
||||
if(edge) //Not a great way to do this yet. Maybe we'll come up with one. We could pre-make sprites... or tile the overlay over it?
|
||||
return
|
||||
|
||||
|
||||
if(!direction) //Stopping our transit
|
||||
appearance = SSskybox.dust_cache["[((x + y) ^ ~(x * y) + z) % 25]"]
|
||||
else if(direction & (NORTH|SOUTH)) //Starting transit vertically
|
||||
@@ -137,7 +137,18 @@
|
||||
. = ..()
|
||||
|
||||
if(edge && ticker?.mode && !density) // !density so 'fake' space turfs don't fling ghosts everywhere
|
||||
A?.touch_map_edge()
|
||||
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)
|
||||
var/cur_x
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
to_chat(src, "<span class='filter_notice'><I>... You can almost hear someone talking ...</I></span>")
|
||||
else
|
||||
if(client && client.prefs.chat_timestamp)
|
||||
msg = replacetext(msg, new/regex("^(<span(?: \[^>]*)?>)((?:.|\\n)*</span>)", ""), "$1[time] $2")
|
||||
msg = replacetext(msg, new/regex("^(<span(?: \[^>]*)?>)((?:.|\\n)*</span>)", ""), "$1[time] $2")
|
||||
to_chat(src,msg)
|
||||
else if(teleop)
|
||||
to_chat(teleop, create_text_tag("body", "BODY:", teleop.client) + "[msg]")
|
||||
@@ -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