diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index a526f7ec191..df18f1b114e 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -120,51 +120,52 @@
//window placing begin
else if(istype(W, /obj/item/stack/sheet/rglass) || istype(W, /obj/item/stack/sheet/glass))
- var/obj/item/stack/ST = W
- if (ST.get_amount() < 1)
- user << "You need at least one sheet of glass for that."
- return
- var/dir_to_set = 1
- if(loc == user.loc)
- dir_to_set = user.dir
- else
- if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions.
- if( x == user.x )
- if( y > user.y )
- dir_to_set = 2
- else
- dir_to_set = 1
- else if( y == user.y )
- if( x > user.x )
- dir_to_set = 8
- else
- dir_to_set = 4
- else
- user << "You can't reach."
- return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
- for(var/obj/structure/window/WINDOW in loc)
- if(WINDOW.dir == dir_to_set)
- user << "There is already a window facing this way there."
+ if (!destroyed)
+ var/obj/item/stack/ST = W
+ if (ST.get_amount() < 1)
+ user << "You need at least one sheet of glass for that."
return
- user << "You start placing the window."
- if(do_after(user,20))
- if(!src) return //Grille destroyed while waiting
+ var/dir_to_set = 1
+ if(loc == user.loc)
+ dir_to_set = user.dir
+ else
+ if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions.
+ if( x == user.x )
+ if( y > user.y )
+ dir_to_set = 2
+ else
+ dir_to_set = 1
+ else if( y == user.y )
+ if( x > user.x )
+ dir_to_set = 8
+ else
+ dir_to_set = 4
+ else
+ user << "You can't reach."
+ return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
for(var/obj/structure/window/WINDOW in loc)
- if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
+ if(WINDOW.dir == dir_to_set)
user << "There is already a window facing this way there."
return
- var/obj/structure/window/WD
- if(istype(W, /obj/item/stack/sheet/rglass))
- WD = new/obj/structure/window(loc,1) //reinforced window
- else
- WD = new/obj/structure/window(loc,0) //normal window
- WD.dir = dir_to_set
- WD.ini_dir = dir_to_set
- WD.anchored = 0
- WD.state = 0
- ST.use(1)
- user << "You place the [WD] on [src]."
- return
+ user << "You start placing the window."
+ if(do_after(user,20))
+ if(!src) return //Grille destroyed while waiting
+ for(var/obj/structure/window/WINDOW in loc)
+ if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
+ user << "There is already a window facing this way there."
+ return
+ var/obj/structure/window/WD
+ if(istype(W, /obj/item/stack/sheet/rglass))
+ WD = new/obj/structure/window(loc,1) //reinforced window
+ else
+ WD = new/obj/structure/window(loc,0) //normal window
+ WD.dir = dir_to_set
+ WD.ini_dir = dir_to_set
+ WD.anchored = 0
+ WD.state = 0
+ ST.use(1)
+ user << "You place the [WD] on [src]."
+ return
//window placing end
else if(istype(W, /obj/item/weapon/shard))
@@ -184,13 +185,12 @@
/obj/structure/grille/proc/healthcheck()
if(health <= 0)
- var/obj/item/stack/rods/newrods = new(loc)
- transfer_fingerprints_to(newrods)
-
if(!destroyed)
icon_state = "brokengrille"
density = 0
destroyed = 1
+ var/obj/item/stack/rods/newrods = new(loc)
+ transfer_fingerprints_to(newrods)
else
if(health <= -6)