From 3ffe8bbb1f321f67877ede597d69e7ee57449430 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 7 Oct 2020 06:26:19 +0200 Subject: [PATCH] [MIRROR] Allows rotating statues with alt click (#1179) * Allows rotating statues with alt click (#54179) Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com> * Allows rotating statues with alt click Co-authored-by: Mickyan <38563876+Mickyan@users.noreply.github.com> Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com> --- code/game/objects/structures/statues.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 81578523bc8..a2e80bff4ae 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -20,6 +20,15 @@ . = ..() AddComponent(art_type, impressiveness) INVOKE_ASYNC(src, /datum.proc/_AddComponent, list(/datum/component/beauty, impressiveness * 75)) + AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE, CALLBACK(src, .proc/can_user_rotate), CALLBACK(src, .proc/can_be_rotated), null) + +/obj/structure/statue/proc/can_be_rotated(mob/user) + if(!anchored) + return TRUE + to_chat(user, "It's bolted to the floor, you'll need to unwrench it first.") + +/obj/structure/statue/proc/can_user_rotate(mob/user) + return isliving(user) && user.canUseTopic(src, BE_CLOSE, no_dexterity = ismonkey(user)) /obj/structure/statue/attackby(obj/item/W, mob/living/user, params) add_fingerprint(user)