diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index 163a510dbe8..18e49b84ee3 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -427,4 +427,9 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
// Shuttle return values
#define SHUTTLE_ALREADY_DOCKED 7
+
#define CHECK_DNA_AND_SPECIES(C) if((!(C.dna)) || (!(C.dna.species))) return
+
+// Evil narsie colour
+#define NARSIE_WINDOW_COLOUR "#7D1919"
+
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 199c3ddae49..a38f9465763 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -134,7 +134,7 @@
return 0
if(!G.confirm())
return 0
- G.affecting.loc = src.loc
+ G.affecting.forceMove(src.loc)
if(istype(src, /obj/structure/table/optable))
var/obj/structure/table/optable/OT = src
G.affecting.resting = 1
@@ -263,29 +263,54 @@
buildstack = /obj/item/stack/sheet/glass
canSmoothWith = null
health = 50
+ var/list/debris = list()
+
+/obj/structure/table/glass/New()
+ . = ..()
+ debris += new frame
+ debris += new /obj/item/weapon/shard
+
+/obj/structure/table/glass/Destroy()
+ for(var/i in debris)
+ qdel(i)
+ . = ..()
/obj/structure/table/glass/Crossed(atom/movable/AM)
. = ..()
if(flags & NODECONSTRUCT)
return
+ if(!isliving(AM))
+ return
// Don't break if they're just flying past
if(AM.throwing)
- return
+ spawn(5)
+ // Check again in a bit though
+ if(AM.loc == get_turf(src))
+ check_break(AM)
+ else
+ check_break(AM)
- if(istype(AM, /mob/living))
- var/mob/living/M = AM
- if(has_gravity(M) && M.mob_size > MOB_SIZE_SMALL)
- table_shatter(M)
+/obj/structure/table/glass/proc/check_break(mob/living/M)
+ if(has_gravity(M) && M.mob_size > MOB_SIZE_SMALL)
+ table_shatter(M)
/obj/structure/table/glass/proc/table_shatter(mob/M)
- visible_message("[src] breaks!")
+ visible_message("[src] breaks!",
+ "You hear breaking glass.")
playsound(src.loc, "shatter", 50, 1)
- new frame(src.loc)
- var/obj/item/weapon/shard/S = new(src.loc)
- S.throw_impact(M)
+ for(var/i in debris)
+ var/atom/movable/AM = i
+ AM.loc = get_turf(src)
+ if(istype(AM, /obj/item/weapon/shard))
+ AM.throw_impact(M)
M.Weaken(5)
qdel(src)
+/obj/structure/table/glass/narsie_act()
+ color = NARSIE_WINDOW_COLOUR
+ for(var/obj/item/weapon/shard/S in debris)
+ S.color = NARSIE_WINDOW_COLOUR
+
/*
* Wooden tables
*/
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 9d8f2f93bbc..e81ee6965a7 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -69,10 +69,9 @@
shatter()
/obj/structure/window/narsie_act()
- var/evil_color = "#7D1919"
- color = evil_color
+ color = NARSIE_WINDOW_COLOUR
for(var/obj/item/weapon/shard/shard in debris)
- shard.color = evil_color
+ shard.color = NARSIE_WINDOW_COLOUR
/obj/structure/window/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)