From b69eb0a40856b0a5f2b79991e0066b74d2efcf8e Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Mon, 4 Jan 2016 16:53:35 -0500 Subject: [PATCH] better checks and fingerprints --- code/game/objects/structures/window.dm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index edb48070d39..b49d491f1b4 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -276,30 +276,37 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f set category = "Object" set src in oview(1) + if(usr.stat || !usr.canmove || usr.restrained()) + return + if(anchored) - usr << "It is fastened to the floor therefore you can't rotate it!" + usr << "It is fastened to the floor therefore you can't rotate it!" return 0 dir = turn(dir, 90) // updateSilicate() air_update_turf(1) ini_dir = dir + add_fingerprint(usr) return - /obj/structure/window/verb/revrotate() set name = "Rotate Window Clockwise" set category = "Object" set src in oview(1) + if(usr.stat || !usr.canmove || usr.restrained()) + return + if(anchored) - usr << "It is fastened to the floor therefore you can't rotate it!" + usr << "It is fastened to the floor therefore you can't rotate it!" return 0 dir = turn(dir, 270) // updateSilicate() air_update_turf(1) ini_dir = dir + add_fingerprint(usr) return