From c4bd6206f105c1ef21b5ec2a9dd23f4c504e8148 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 28 Feb 2025 14:14:55 +0100 Subject: [PATCH 1/3] climbing fix --- code/game/turfs/open_space.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/turfs/open_space.dm b/code/game/turfs/open_space.dm index 1606e76c996c..e3576c8aa70d 100644 --- a/code/game/turfs/open_space.dm +++ b/code/game/turfs/open_space.dm @@ -16,7 +16,7 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr /turf/open_space/Initialize() ADD_TRAIT(src, TURF_Z_TRANSPARENT_TRAIT, TRAIT_SOURCE_INHERENT) - + return INITIALIZE_HINT_LATELOAD /turf/open_space/Entered(atom/movable/entered_movable, atom/old_loc) @@ -48,10 +48,12 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr /turf/open_space/attack_hand(mob/user) if(user.action_busy) return - + var/turf/current_turf = get_turf(src) if(istype(current_turf, /turf/open_space)) + 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)) From f1a54124010c63799475b0f477ef91a684147f87 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 28 Feb 2025 14:25:08 +0100 Subject: [PATCH 2/3] improves return logic --- code/game/turfs/open_space.dm | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/code/game/turfs/open_space.dm b/code/game/turfs/open_space.dm index e3576c8aa70d..7c5a2845f94a 100644 --- a/code/game/turfs/open_space.dm +++ b/code/game/turfs/open_space.dm @@ -51,23 +51,26 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr var/turf/current_turf = get_turf(src) - if(istype(current_turf, /turf/open_space)) - 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)) - to_chat(user, SPAN_WARNING("You were interrupted!")) - return + if(!istype(current_turf, /turf/open_space)) + return - user.visible_message(SPAN_WARNING("[user] climbs down."), SPAN_WARNING("You climb down.")) + if(!current_turf.Enter(user)) + return - var/turf/below = SSmapping.get_turf_below(current_turf) - while(istype(below, /turf/open_space)) - below = SSmapping.get_turf_below(below) + user.visible_message(SPAN_WARNING("[user] starts climbing down."), SPAN_WARNING("You start climbing down.")) - user.forceMove(below) + if(!do_after(user, 3 SECONDS, INTERRUPT_ALL, BUSY_ICON_GENERIC)) + to_chat(user, SPAN_WARNING("You were interrupted!")) return + user.visible_message(SPAN_WARNING("[user] climbs down."), SPAN_WARNING("You climb down.")) + + var/turf/below = SSmapping.get_turf_below(current_turf) + while(istype(below, /turf/open_space)) + below = SSmapping.get_turf_below(below) + + user.forceMove(below) + return + /turf/open_space/is_weedable() return NOT_WEEDABLE From ef795eae03484f64ee94b9e5c6f746da80f37260 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 28 Feb 2025 14:25:56 +0100 Subject: [PATCH 3/3] removes whiteline --- code/game/turfs/open_space.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/game/turfs/open_space.dm b/code/game/turfs/open_space.dm index 7c5a2845f94a..03c18afc06b0 100644 --- a/code/game/turfs/open_space.dm +++ b/code/game/turfs/open_space.dm @@ -16,7 +16,6 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr /turf/open_space/Initialize() ADD_TRAIT(src, TURF_Z_TRANSPARENT_TRAIT, TRAIT_SOURCE_INHERENT) - return INITIALIZE_HINT_LATELOAD /turf/open_space/Entered(atom/movable/entered_movable, atom/old_loc)