Skip to content

Commit

Permalink
Hydrotray consumes nutrients disregarding the mixture contents (tgsta…
Browse files Browse the repository at this point in the history
…tion#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:
  • Loading branch information
MTandi authored Nov 19, 2023
1 parent 59b5d98 commit f2a15ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/modules/hydroponics/hydroponics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit f2a15ba

Please sign in to comment.