Skip to content

Battery Buffer Rework#323

Merged
TechLord22 merged 15 commits intoGregTechCEu:masterfrom
Syrcan:battery_containers
Dec 14, 2021
Merged

Battery Buffer Rework#323
TechLord22 merged 15 commits intoGregTechCEu:masterfrom
Syrcan:battery_containers

Conversation

@Syrcan
Copy link
Copy Markdown
Contributor

@Syrcan Syrcan commented Dec 10, 2021

What:
This PR tackles on wonky behaviors on the current battery buffer. Sections of the code are largely reworked for the sake of better functionality for gameplay.

How solved:
Splits energy received and exported to and from all the batteries evenly.
Uses an internal buffer for excess energy that didn't fit into the batteries, and re-uses it whenever possible.
Longer explanation from reading the code, which may give you headaches. Blame dan for refusing gt5-style battery buffers!

Outcome:
All energy coming in and out of the battery buffer will be split evenly between the batteries.
Battery buffer now accepts 2A per battery as input.
Battery buffer is now able to always fully fill or fully empty batteries.
Closes #302 once I cherry-pick the 9 -> 8 slots batt buffer.

Additional info:
EnergyContainerBatteryBuffer now extends EnergyContainerHandler instead of being its own thing, to make use of parent methods and variables.
Will render #302 obsolete.

Possible compatibility issue:
None expected.

@Syrcan
Copy link
Copy Markdown
Contributor Author

Syrcan commented Dec 10, 2021

Changes not notified:
Battery Buffers now accept 2A per battery.

I also cherry picked Tech's battery buffer change so this should be ready to merge, unless you have requests.

@serenibyss serenibyss mentioned this pull request Dec 12, 2021
@TechLord22 TechLord22 merged commit 8b118f8 into GregTechCEu:master Dec 14, 2021
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.

3 participants