From c0ad9be2833ffc01adadb18daba5af5def5d0f5b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 19 Nov 2023 06:37:29 +0100 Subject: [PATCH] [MIRROR] Hydrotray consumes nutrients disregarding the mixture contents [MDB IGNORE] (#25101) * Hydrotray consumes nutrients disregarding the mixture contents (#79794) ## About The Pull Request Hydrotrays were using `remove_any` which led to weird behaviour when you mix fertilizers. It could randomly select which reagents to consume from the hydrotray, and which reagents should stay unotuched. With `remove_all`, the plant now simply consumes a unit of the mixture, disregarding the contents. ## Why It's Good For The Game This simple fix unlocks an entire new level of gameplay for botany, as you can make mixtures that work consistently. ## Changelog :cl: fix: Hydrotrays consume nutrients according to their proportion in the mix, instead of randomly picking reagents to consume every cycle. /:cl: * Hydrotray consumes nutrients disregarding the mixture contents --------- Co-authored-by: Andrew --- code/modules/hydroponics/hydroponics.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 593651460d5..9b2c4aeefa3 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -326,9 +326,9 @@ // Nutrients deplete at a constant rate, since new nutrients can boost stats far easier. apply_chemicals(lastuser?.resolve()) if(self_sustaining) - reagents.remove_any(min(0.5, nutridrain)) + reagents.remove_all(min(0.5, nutridrain)) else - reagents.remove_any(nutridrain) + reagents.remove_all(nutridrain) // Lack of nutrients hurts non-weeds if(reagents.total_volume <= 0 && !myseed.get_gene(/datum/plant_gene/trait/plant_type/weed_hardy))