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

Fix Transformers Being Worse Than Accumulators #5985

Merged
merged 8 commits into from
Jun 30, 2024

Conversation

voidsong-dragonfly
Copy link
Contributor

@voidsong-dragonfly voidsong-dragonfly commented Jun 27, 2024

Currently, transformers do not limit energy flowing through them at all. This makes them strictly worse than accumulators as the player has no way of preventing overflow through transformers and thus is likely to burn wires.

This PR aims to fix that, registering transformers as limiting connections within the wire network, limited to the throughput of their lowest wire. This makes transformers better than accumulators as they can handle ~8 times the throughput in a block that costs roughly the same to set up, and in minimal excess space.

Their limiting may be a little messy in some edge cases because the more performant setup I developed does not factor loss into the limit, assuming the limit is at the source and not nebulously some way past the source, but it will make transformers more useful for stepping down.

Chaining transformers works, as well, the lowest transformer on a path will be used as the limit.

Fixes #5894, Fixes #5574

 - Limits transformer throughput to lower wire
 - Currently wastes excess power passed through
 - Intent is to make transformers competitive with accumulators, which make burn impossible
 - Output is limited
 - Currently, to fix current transformer we backsearch the connection to update all connections
 - There are almost certainly better ways to do this, don't use this way, this just proves I can do it
 - No reverse searches, only two scans
 - Most of the association work is done at setup
 - Back-transfer now handled elegantly
@BluSunrize BluSunrize merged commit 090137a into BluSunrize:1.20.4 Jun 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suddently connecting a lot of lamps creates masive power surge Transformer burning wires
2 participants