Refactors for grinding & juicing (#87735)

## About The Pull Request
- Grinding & juicing are now recursive operations (grind the item & all
its contents) not just for reagent grinder but also for mortar pedestal
& plumbing grinder so you can get all them juices
- Fixes #87719. Plumbing grinder won't destroy slime extracts after
grinding
- Mortar pedestal now grinds & juices more items since it correctly
checks if that object has more reagents to offer
- Reagent grinder, plumbing grinder & mortar pedestal now respect
`blend_requirements()` so you get consistent behaviour across them

## Changelog
🆑
fix: mortar pedestal now grinds & juices items that previously could not
be processed
fix: plumbing grinder won't destroy slime extracts after grinding
refactor: grinding & juicing code has been refactored overall. Please
report bugs on github
/🆑
This commit is contained in:
SyncIt21
2024-11-10 10:28:17 +01:00
committed by GitHub
parent b4e5e916f3
commit d2c4470937
7 changed files with 126 additions and 67 deletions
+1 -5
View File
@@ -135,14 +135,10 @@
return
return TRUE
/obj/item/stack/grind(datum/reagents/target_holder, mob/user)
/obj/item/stack/grind_atom(datum/reagents/target_holder, mob/user)
var/current_amount = get_amount()
if(current_amount <= 0 || QDELETED(src)) //just to get rid of this 0 amount/deleted stack we return success
return TRUE
if(on_grind() == -1)
return FALSE
if(isnull(target_holder))
return TRUE
if(reagents)
reagents.trans_to(target_holder, reagents.total_volume, transferred_by = user)