diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index a79860522d..bed3cb9de0 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -78,13 +78,16 @@
do_climb(target)
-/obj/structure/proc/do_climb(var/mob/living/user)
-
+/obj/structure/proc/can_climb(var/mob/living/user)
if (!can_touch(user) || !climbable)
- return
+ return 0
var/turf/T = src.loc
- if(!T || !istype(T)) return
+ if(!T || !istype(T)) return 0
+
+ if (!user.Adjacent(src))
+ user << "\red You can't climb there, the way is blocked."
+ return 0
for(var/obj/O in T.contents)
if(istype(O,/obj/structure))
@@ -92,29 +95,24 @@
if(S.climbable)
continue
- if(O && O.density)
- usr << "\red There's \a [O] in the way."
- return
+ if(O && O.density && !(O.flags & ON_BORDER)) //ON_BORDER structures are handled by the Adjacent() check.
+ user << "\red There's \a [O] in the way."
+ return 0
+ return 1
+
+/obj/structure/proc/do_climb(var/mob/living/user)
+ if (!can_climb(user))
+ return
usr.visible_message("[user] starts climbing onto \the [src]!")
if(!do_after(user,50))
return
- if (!can_touch(user) || !climbable)
+ if (!can_climb(user))
return
- for(var/obj/O in T.contents)
- if(istype(O,/obj/structure))
- var/obj/structure/S = O
- if(S.climbable)
- continue
-
- if(O && O.density)
- usr << "\red There's \a [O] in the way."
- return
-
- usr.loc = get_turf(src)
+ usr.forceMove(get_turf(src))
if (get_turf(user) == get_turf(src))
usr.visible_message("[user] climbs onto \the [src]!")
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 90e639c737..bcd09a51cd 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -448,6 +448,7 @@
dir = direction
if(dir != NORTH)
layer = 5
+ climbable = 0 //flipping tables allows them to be used as makeshift barriers
flipped = 1
flags |= ON_BORDER
for(var/D in list(turn(direction, 90), turn(direction, -90)))
@@ -465,6 +466,7 @@
layer = initial(layer)
flipped = 0
+ climbable = initial(climbable)
flags &= ~ON_BORDER
for(var/D in list(turn(dir, 90), turn(dir, -90)))
var/obj/structure/table/T = locate() in get_step(src.loc,D)