mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 17:13:46 +01:00
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 <adrermail@gmail.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
@@ -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(
|
||||
"<span class='notice'>[user] tries to eject the contents of [src] manually.</span>",
|
||||
"<span class='notice'>You operate the manual ejection lever on [src].</span>"
|
||||
)
|
||||
if(do_after(user, 5 SECONDS, target = src))
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] ejects the contents of [src].</span>",
|
||||
"<span class='notice'>You eject the contents of [src].</span>"
|
||||
)
|
||||
eject()
|
||||
|
||||
// update the icon & overlays to reflect mode & status
|
||||
/obj/machinery/disposal/proc/update()
|
||||
if(stat & BROKEN)
|
||||
|
||||
Reference in New Issue
Block a user