mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Allow climbing up and falling through opened plated catwalks
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
var/area/area = get_area(src)
|
||||
if(direction == UP && area.has_gravity() && !can_overcome_gravity())
|
||||
var/obj/structure/lattice/lattice = locate() in destination.contents
|
||||
var/obj/structure/catwalk/catwalk = locate() in destination.contents
|
||||
if(lattice)
|
||||
var/pull_up_time = max(5 SECONDS + (src.movement_delay() * 10), 1)
|
||||
to_chat(src, "<span class='notice'>You grab \the [lattice] and start pulling yourself upward...</span>")
|
||||
@@ -57,6 +58,15 @@
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You gave up on pulling yourself up.</span>")
|
||||
return 0
|
||||
else if(catwalk?.hatch_open)
|
||||
var/pull_up_time = max(5 SECONDS + (src.movement_delay() * 10), 1)
|
||||
to_chat(src, "<span class='notice'>You grab the edge of \the [catwalk] and start pulling yourself upward...</span>")
|
||||
destination.audible_message("<span class='notice'>You hear something climbing up \the [catwalk].</span>")
|
||||
if(do_after(src, pull_up_time))
|
||||
to_chat(src, "<span class='notice'>You pull yourself up.</span>")
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You gave up on pulling yourself up.</span>")
|
||||
return 0
|
||||
else if(ismob(src)) //VOREStation Edit Start. Are they a mob, and are they currently flying??
|
||||
var/mob/H = src
|
||||
if(H.flying)
|
||||
@@ -294,7 +304,7 @@
|
||||
|
||||
// Things that prevent objects standing on them from falling into turf below
|
||||
/obj/structure/catwalk/CanFallThru(atom/movable/mover as mob|obj, turf/target as turf)
|
||||
if(target.z < z)
|
||||
if((target.z < z) && !hatch_open)
|
||||
return FALSE // TODO - Technically should be density = 1 and flags |= ON_BORDER
|
||||
if(!isturf(mover.loc))
|
||||
return FALSE // Only let loose floor items fall. No more snatching things off people's hands.
|
||||
|
||||
Reference in New Issue
Block a user