diff --git a/code/game/turfs/open_space.dm b/code/game/turfs/open_space.dm index 03c18afc06b0..e7fc7c13371a 100644 --- a/code/game/turfs/open_space.dm +++ b/code/game/turfs/open_space.dm @@ -26,25 +26,7 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr /turf/open_space/on_throw_end(atom/movable/thrown_atom) check_fall(thrown_atom) -/turf/open_space/proc/check_fall(atom/movable/movable) - if(movable.flags_atom & NO_ZFALL) - return - - var/height = 1 - var/turf/below = SSmapping.get_turf_below(get_turf(src)) - - while(istype(below, /turf/open_space)) - below = SSmapping.get_turf_below(below) - height++ - - movable.forceMove(below) - movable.onZImpact(below, height) - - -/turf/open_space/attack_alien(mob/user) - attack_hand(user) - -/turf/open_space/attack_hand(mob/user) +/turf/open_space/proc/climb_down(mob/user) if(user.action_busy) return @@ -53,9 +35,6 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr if(!istype(current_turf, /turf/open_space)) return - if(!current_turf.Enter(user)) - return - user.visible_message(SPAN_WARNING("[user] starts climbing down."), SPAN_WARNING("You start climbing down.")) if(!do_after(user, 3 SECONDS, INTERRUPT_ALL, BUSY_ICON_GENERIC)) @@ -71,5 +50,19 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr user.forceMove(below) return +/turf/open_space/proc/check_fall(atom/movable/movable) + if(movable.flags_atom & NO_ZFALL) + return + + var/height = 1 + var/turf/below = SSmapping.get_turf_below(get_turf(src)) + + while(istype(below, /turf/open_space)) + below = SSmapping.get_turf_below(below) + height++ + + movable.forceMove(below) + movable.onZImpact(below, height) + /turf/open_space/is_weedable() return NOT_WEEDABLE diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index d91fb88fae5c..d769a07905bd 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -344,6 +344,14 @@ if(!mover.Collide(A)) return FALSE + if(mover.move_intentionally && istype(src, /turf/open_space) && istype(mover,/mob/living)) + var/turf/open_space/space = src + var/mob/living/climber = mover + if(climber.a_intent == INTENT_HARM) + return TRUE + space.climb_down(climber) + return FALSE + return TRUE //Nothing found to block so return success! /turf/Entered(atom/movable/A)