Fix sinks and toilets not draining (#33691)

* Fix AutoDrain

Per the system comments, AutoDrain is designed to automatically move
puddles into the drain (like a floor drain). Drains without AutoDrain
are still supposed to gradually empty the buffer, but not remove puddles
(like sinks and toilets).

However, a logic error in the original implementation causes drains with
AutoDrain set to false to simply not work. Hence sinks never emptied.

* Update documentation
This commit is contained in:
Partmedia
2024-12-03 18:42:16 -08:00
committed by GitHub
parent 87182635b6
commit cf202e805d
2 changed files with 31 additions and 35 deletions

View File

@@ -27,8 +27,8 @@ public sealed partial class DrainComponent : Component
public float Accumulator = 0f;
/// <summary>
/// Does this drain automatically absorb surrouding puddles? Or is it a drain designed to empty
/// solutions in it manually?
/// If true, automatically transfers solutions from nearby puddles and drains them. True for floor drains;
/// false for things like toilets and sinks.
/// </summary>
[DataField]
public bool AutoDrain = true;