Skip to content

Comments

Fix issues with electric tools#1558

Merged
TechLord22 merged 2 commits intomasterfrom
tc-fix-powerunit-charge
Mar 4, 2023
Merged

Fix issues with electric tools#1558
TechLord22 merged 2 commits intomasterfrom
tc-fix-powerunit-charge

Conversation

@TechLord22
Copy link
Member

What

This PR fixes two issues with electric tools.

First, it fixes issues found in ShapedOreEnergyTransferRecipe. It previously attempted to charge the output item before overriding its max charge. In cases where there was only one item to transfer charge from, it would be transferred before setting the maximum charge. This can be seen when crafting tools using power units with higher maximum charges than the default power unit. This PR fixes this bug.

The second issue fixed is related to electric tools breaking. When electric tools broke, the power unit stack dropped would have the default maximum charge. This PR fixes this by overriding the maximum charge to be the same as the tool's.

Outcome

Fixes issues with electric tools. Closes #1484.

@TechLord22 TechLord22 added the type: bug Something isn't working label Mar 3, 2023
Copy link
Contributor

@LAGIdiot LAGIdiot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation seems reasonable.

@TechLord22 TechLord22 merged commit a53680f into master Mar 4, 2023
@TechLord22 TechLord22 deleted the tc-fix-powerunit-charge branch March 4, 2023 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG?] electric tools charge is incorrect

3 participants