From e0e9b72eb20f289f3dff9dd6a712df3093835c6a Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 8 Feb 2024 22:15:51 +0100 Subject: [PATCH] [MIRROR] toilet bong altclick sanity (#26377) toilet bong altclick sanity (#81263) ## About The Pull Request i still dont know what they meant by sanity checks but this should be it ## Why It's Good For The Game bug or something bad ## Changelog :cl: fix: you may no longer altclick unanchored toiletbongs from any range in any condition to rotate them /:cl: Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com> --- code/game/objects/structures/toiletbong.dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/game/objects/structures/toiletbong.dm b/code/game/objects/structures/toiletbong.dm index a0aaeeaa4bb..e5c5193e46f 100644 --- a/code/game/objects/structures/toiletbong.dm +++ b/code/game/objects/structures/toiletbong.dm @@ -11,8 +11,12 @@ /obj/structure/toiletbong/Initialize(mapload) . = ..() + create_storage() + AddComponent(/datum/component/simple_rotation, AfterRotation = CALLBACK(src, PROC_REF(AfterRotation))) create_storage(max_total_storage = 100, max_slots = 12, canhold = /obj/item/food) atom_storage.attack_hand_interact = FALSE + atom_storage.rustle_sound = FALSE + atom_storage.animated = FALSE weed_overlay = mutable_appearance('icons/obj/watercloset.dmi', "toiletbong_overlay") START_PROCESSING(SSobj, src) @@ -72,6 +76,9 @@ anchored = TRUE return TRUE +/obj/structure/toiletbong/proc/AfterRotation(mob/user, degrees) + playsound(src, 'sound/items/deconstruct.ogg', 50) + /obj/structure/toiletbong/crowbar_act(mob/living/user, obj/item/tool) if(anchored) return FALSE @@ -86,13 +93,6 @@ qdel(src) return TRUE -/obj/structure/toiletbong/AltClick(mob/living/user) - if(anchored) - return ..() - setDir(turn(dir,90)) - playsound(src, 'sound/items/deconstruct.ogg', 50) - return - /obj/structure/toiletbong/emag_act(mob/user, obj/item/card/emag/emag_card) playsound(src, 'sound/effects/fish_splash.ogg', 50) user.balloon_alert(user, "whoops!")