Skip to content

Comments

Show name of locked fluid in Quantum Tank#1733

Merged
TechLord22 merged 2 commits intomasterfrom
alson-show-locked-fluid
May 1, 2023
Merged

Show name of locked fluid in Quantum Tank#1733
TechLord22 merged 2 commits intomasterfrom
alson-show-locked-fluid

Conversation

@ALongStringOfNumbers
Copy link
Contributor

What

Always shows the fluid name of locked fluids on Quantum Tanks, even when all fluid has been extracted, but the tank is still locked. Closes #1693

Outcome

Always show locked fluid information on quantum tanks

@ALongStringOfNumbers ALongStringOfNumbers added the type: feature New feature or request label Apr 30, 2023
Copy link
Member

@TechLord22 TechLord22 left a comment

Choose a reason for hiding this comment

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

Unraveling these ternaries into regular if statements would be appreciated.


private Consumer<List<ITextComponent>> getFluidNameText(TankWidget tankWidget) {
return (list) -> {
String fluidName = tankWidget.getFluidLocalizedName().isEmpty() ? this.lockedFluid != null ? this.lockedFluid.getLocalizedName() : "" : tankWidget.getFluidLocalizedName();
Copy link
Member

Choose a reason for hiding this comment

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

In the cases where this ternary and the one below result in "", should adding to the list be prevented entirely, instead of adding the empty string?

@TechLord22 TechLord22 merged commit 89dfe78 into master May 1, 2023
@TechLord22 TechLord22 deleted the alson-show-locked-fluid branch May 1, 2023 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty locked super & quantum tank does not show locked fluid

2 participants