Skip to content

Commit

Permalink
[MIRROR] Allows dragging from boxes into All-In-One Grinders (#2206)
Browse files Browse the repository at this point in the history
* Allows dragging from boxes into All-In-One Grinders (#81591)

## About The Pull Request
Simply allows you to drag from storage containers directly onto
All-In-One Grinders. Current behavior just spills it on the same tile.

## Why It's Good For The Game
I already had to put all these items in the box in the first place, this
just makes it slightly easier on the way back.

* Allows dragging from boxes into All-In-One Grinders

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Echriser <[email protected]>
  • Loading branch information
3 people authored Mar 1, 2024
1 parent a95888e commit b054eb3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions code/modules/reagents/chemistry/machinery/reagentgrinder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
holdingitems = list()
beaker = new /obj/item/reagent_containers/cup/beaker/large(src)
warn_of_dust()
RegisterSignal(src, COMSIG_STORAGE_DUMP_CONTENT, PROC_REF(on_storage_dump))

/// Add a description to the current beaker warning of blended dust, if it doesn't already have that warning.
/obj/machinery/reagentgrinder/proc/warn_of_dust()
Expand Down Expand Up @@ -205,6 +206,24 @@
holdingitems[weapon] = TRUE
return FALSE

/obj/machinery/reagentgrinder/proc/on_storage_dump(datum/source, datum/storage/storage, mob/user)
SIGNAL_HANDLER

for(var/obj/item/to_dump in storage.real_location)
if(holdingitems.len >= limit)
break

if(!to_dump.grind_results && !to_dump.juice_typepath)
continue

if(!storage.attempt_remove(to_dump, src, silent = TRUE))
continue

holdingitems[to_dump] = TRUE

to_chat(user, span_notice("You dump [storage.parent] into [src]."))
return STORAGE_DUMP_HANDLED

/obj/machinery/reagentgrinder/ui_interact(mob/user) // The microwave Menu //I am reasonably certain that this is not a microwave
. = ..()

Expand Down

0 comments on commit b054eb3

Please sign in to comment.