From eedc9d22edcf06aaf2788623abedfbc394ec910f Mon Sep 17 00:00:00 2001 From: Adrer Date: Tue, 14 Feb 2023 20:52:57 +0100 Subject: [PATCH] Alt-click on disposal bins to manually eject their contents (#20294) * Add manual eject to disposal bins * Update code/modules/recycling/disposal.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Apply styling change Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --------- Co-authored-by: adrermail@gmail.com Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Farie82 --- code/modules/recycling/disposal.dm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index c3d2f2a5a3a..bef07c38e6e 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -9,7 +9,7 @@ /obj/machinery/disposal name = "disposal unit" - desc = "A pneumatic waste disposal unit." + desc = "A pneumatic waste disposal unit. Alt-click to manually eject its contents." icon = 'icons/obj/pipes/disposal.dmi' icon_state = "disposal" anchored = TRUE @@ -329,6 +329,20 @@ AM.pipe_eject(0) update() +/obj/machinery/disposal/AltClick(mob/user) + if(!Adjacent(user) || !ishuman(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) + return + user.visible_message( + "[user] tries to eject the contents of [src] manually.", + "You operate the manual ejection lever on [src]." + ) + if(do_after(user, 5 SECONDS, target = src)) + user.visible_message( + "[user] ejects the contents of [src].", + "You eject the contents of [src]." + ) + eject() + // update the icon & overlays to reflect mode & status /obj/machinery/disposal/proc/update() if(stat & BROKEN)