Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Fluid Regulators not respecting Keep Exact #1705

Closed
Exaxxion opened this issue Aug 7, 2021 · 1 comment · Fixed by #1717
Closed

[BUG] Fluid Regulators not respecting Keep Exact #1705

Exaxxion opened this issue Aug 7, 2021 · 1 comment · Fixed by #1717
Labels
status: unverified type: bug Something isn't working

Comments

@Exaxxion
Copy link
Collaborator

Exaxxion commented Aug 7, 2021

Fluid Regulators appear to be ignoring their mode setting and just transferring the maximum amount per second they're allowed to.

Versions
GTCE: d9e7ed4 via ./gradlew runClient

Setup
Playing Solo (probably doesn't matter though), new superflat world created

Steps To Reproduce

  1. Place down an autoclave next to a quantum tank
  2. Place a Fluid Regulator on the tank on the side adjacent to the autoclave
  3. Set the Fluid Regulator to Export, Flow Rate 1mB/s, Keep Exact: 2mB
  4. Fill the quantum tank with some palladium
  5. Observe that 1mB of palladium is entering the autoclave each second and it will continue until all of the palladium has entered the autoclave.

Expected behavior
The fluid regulator will move 1mB of palladium into the autoclave then stop transferring until the autoclave has no palladium left in its fluid slot.

Screenshots
image
image

@Exaxxion Exaxxion added type: bug Something isn't working status: unverified labels Aug 7, 2021
@eiis1000
Copy link

eiis1000 commented Aug 7, 2021

Alternatively, reproduce using a fluid regulator on an autoclave set to import (I used Pd as well with a ME fluid interface stocking Pd) and keep exact is ignored as well. Seems to take input from the interface in increments of whatever is set in Keep Exact per tick.

Exaxxion referenced this issue in Nomifactory/GregTech Sep 15, 2021
Fixes #1705, Supersedes #1710

The existing algorithm was buggy and the proposed rework was hard to
follow the logic, so I came up with a more straightforward algorithm
which should be easier to understand and maintain.

I have also created some tests to demonstrate the functionality of the
revised algorithm and ensure that the behavior is the same as before,
besides the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: unverified type: bug Something isn't working
Projects
None yet
2 participants