From cde421e0eb322882a3b59fadd08a11a409504d9d Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 22 Feb 2017 23:07:18 +0000 Subject: [PATCH] Refactoring of the Rotate verb removes a few unnecessary checks. Still not using setDir yet, as I have yet to work out how it works. To come! --- .../structures/stool_bed_chair_nest/chairs.dm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index cb54ae30119..c7c22da2f50 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -59,14 +59,17 @@ set category = "Object" set src in oview(1) - if(!usr || !isturf(usr.loc)) - return - if(usr.stat || usr.restrained()) + if(config.ghost_interaction) + dir = turn(dir, 90) + handle_rotation() return + else + if(usr.incapacitated()) + return - src.dir = turn(src.dir, 90) - handle_rotation() - return + dir = turn(dir, 90) + handle_rotation() + return /obj/structure/stool/bed/chair/AltClick(mob/user) if(user.incapacitated())