From cbe0867d35c90a34b9bf26754080b55b823d8f25 Mon Sep 17 00:00:00 2001
From: SimplyLogan <47579821+loganuk@users.noreply.github.com>
Date: Sat, 10 Jan 2026 23:35:58 +0000
Subject: [PATCH] Making surgery beds on top of stasis beds no longer possible
(#94802)
## About The Pull Request
Fixes #94801 by making table construction closer to other construction
objects and has the same error message as other construction bits,
Checked the logic in crafting for comparison as well and tested the fix
in game.
## Why It's Good For The Game
- Fixes unintended exploit method of having all the benefits of surgery
with stasis beds
## Changelog
:cl:
fix: Making surgery beds on top of stasis beds no longer possible
/:cl:
Co-authored-by: loganuk
---
code/game/objects/structures/table_frames.dm | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm
index f5df2da0fa5..ea1e8aa79af 100644
--- a/code/game/objects/structures/table_frames.dm
+++ b/code/game/objects/structures/table_frames.dm
@@ -62,14 +62,24 @@
if(our_stack.get_amount() < 1)
balloon_alert(user, "need more material!")
return ITEM_INTERACT_BLOCKING
- if(locate(/obj/structure/table) in loc)
- balloon_alert(user, "can't stack tables!")
- return ITEM_INTERACT_BLOCKING
+
+ // Check if the turf is blocked by dense objects or objects that block construction
+ for(var/obj/object in loc)
+ if(object.density && !(object.obj_flags & IGNORE_DENSITY) || object.obj_flags & BLOCKS_CONSTRUCTION)
+ balloon_alert(user, "something is in the way!")
+ return ITEM_INTERACT_BLOCKING
balloon_alert(user, "constructing table...")
if(!do_after(user, 2 SECONDS, target = src))
return ITEM_INTERACT_BLOCKING
- if((locate(/obj/structure/table) in loc) || !our_stack.use(1))
+
+ // Check again after the delay in case something was placed during construction
+ for(var/obj/object in loc)
+ if(object.density && !(object.obj_flags & IGNORE_DENSITY) || object.obj_flags & BLOCKS_CONSTRUCTION)
+ balloon_alert(user, "something is in the way!")
+ return ITEM_INTERACT_BLOCKING
+
+ if(!our_stack.use(1))
return ITEM_INTERACT_BLOCKING
new table_type(loc, src, our_stack)