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

Fluid conduit have an incorrect rate #1023

Open
zhykzhykzhyk opened this issue Mar 6, 2025 · 4 comments
Open

Fluid conduit have an incorrect rate #1023

zhykzhykzhyk opened this issue Mar 6, 2025 · 4 comments
Labels
Area-Conduits Everything involving conduits

Comments

@zhykzhykzhyk
Copy link

int rate = (int)Math.ceil(conduit.transferRatePerTick() * (20.0 / conduit.graphTickRate()));

This means realFluidRate = tooltipFluidRate * 20 / (tickRate * tickRate), which is 4/5 of the fluid rate shown in tooltip in default settings.

@Rover656
Copy link
Member

Rover656 commented Mar 6, 2025

I don't follow the logic here. The tooltip will show both the effective rate (transferRatePerTick) and also the rate per graph tick (which is that formula there). This is done because conduit graphs tick only 4 times per second.

If I'm missing something obvious though do point it out :)

@CitiesXL2815 CitiesXL2815 added the Area-Conduits Everything involving conduits label Mar 6, 2025
@zhykzhykzhyk
Copy link
Author

Because ticks 4 times per second but the graph tick rate is 5 (20 / 4).
For example of the lowest tier of fluid conduit, its extraction rate is 50mB/t which equals to 1000mB/s. But using the mentioned formular, every graph tick only transfer 200mB, with 4 graph ticks per second, gives a total 800mB/s.

@zhykzhykzhyk
Copy link
Author

The correct formular should be int rate = (int)(conduit.transferRatePerTick() * conduit.graphTickRate());

@Rover656
Copy link
Member

Rover656 commented Mar 8, 2025

Aha I see! This code is a hangover from when transferRatePerTick was perSecond. Thanks for catching this - I'll get it fixed up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Conduits Everything involving conduits
Projects
None yet
Development

No branches or pull requests

3 participants