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

PipeNet rewrite #2304

Open
wants to merge 156 commits into
base: master
Choose a base branch
from
Open

PipeNet rewrite #2304

wants to merge 156 commits into from

Conversation

M-W-K
Copy link
Contributor

@M-W-K M-W-K commented Dec 15, 2023

What

Completely rewrites the pipenet system from the ground up, with three major goals:

  1. Ease of future expansion & general modularity
  2. Better routing for all pipenets, most importantly the fluidnet
  3. Use of a graph abstraction instead of walking the world during routing

Outcome

Future expansion of pipenets, or just graphnets in general, will be much easier for gtceu and addon mods. Half of this is because the mess of generics lying around everywhere has been drastically cut back. The other half is due to a more modular approach to storage of properties on the net; the system is very reminiscent of material properties. In addition, the abstract 'graphnet' api backing pipenets has been made separate, allowing for graphnets that aren't pipenets.

Since routing of things is now based on the more abstract graphnet, all pipenets can use any of the traversal algorithms that are defined, if they are made compatible with the traversal algorithm. This means things like round robin fluid distribution.
In addition, moving to the graph abstraction means that traversal can be across the graph instead of the world. By updating the topology of the graph based on changes to the world, but not relying on the world itself, this allows for avoiding things like chunkloading for traversal, as well as the application of graph theory principles.

Additional Information

Ignore the like 75 commits that came before I started rewriting from scratch, most of that code will be discarded (after the new implementation is finished because I still steal code from the old stuff)
Also fixes #2582

Potential Compatibility Issues

The entire pipenet API and internals is getting rewritten. There will be very large compatibility issues with any mod that touched the pipenet.

Progress

  • Core logic
  • Cables
  • Pipes
  • Optical & Laser
  • Rendering (aka the final boss)
  • Bugfixing (aka the true final boss)
  • Backwards compatibility (aka I don't even know man)

@M-W-K M-W-K marked this pull request as ready for review December 21, 2023 23:59
@M-W-K M-W-K requested review from a team as code owners December 21, 2023 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing frames from pipes in structure won't cause multiblock structure invalidization
3 participants