Skip to content

Fix various UI bugs in the RealFuelsWindow - #371

Merged
siimav merged 7 commits into
KSP-RO:masterfrom
periodically-makes-puns:fixes
Jul 27, 2026
Merged

Fix various UI bugs in the RealFuelsWindow#371
siimav merged 7 commits into
KSP-RO:masterfrom
periodically-makes-puns:fixes

Conversation

@periodically-makes-puns

Copy link
Copy Markdown
Contributor

I'd separate these but they're each like 10 lines at most

  • Rescaling a tank with a locked resources should now also scale unlocked resources to compensate for the additional needed/unused volume. Failing to do this led to tanks being overutilised if a resource was locked and the tank was later downsized.
  • Adding a resource now reads the Volume rather than the Percentage. Should resolve Requested and Allocated "fuel" value do not match, potential Floating Point issue? #369. This does open up the issue in the opposite direction, technically.
  • The UI window should now allow typing when editing the resources of a part that is currently in symmetry. We only allow one part to call ShowGUI and the rest from the symmetry counterparts are suppressed. There's still a lot of weirdness around parts in symmetry, mainly involving resources seemingly being duplicated, so this is by no means a complete fix.

@periodically-makes-puns

Copy link
Copy Markdown
Contributor Author

Fixed a couple things pointed out by siimav. Unlocked tanks scaling up is intentional, but we do also scale empty volume now.

To cover the default case, if the percentage field is 100% then we propagate that over to the Amount field (if it's not active), otherwise we propagate the Amount field to the percentage field.

Locks are still a mess and I feel like it needs a rewrite to be inherent to the tank so that it's not dependent on the UI being open. I'm not currently willing to work on that.

@siimav

siimav commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

This does not build

Comment thread Source/Tanks/ModuleFuelTanks.cs
Comment thread Source/Tanks/RealFuelsWindow.cs Outdated
Comment thread Source/Tanks/RealFuelsWindow.cs Outdated
Comment thread Source/Tanks/RealFuelsWindow.cs
@periodically-makes-puns

Copy link
Copy Markdown
Contributor Author

I got sidetracked for a bit, but I think I covered everything. The extra decimal point does sort of exacerbate the existing width issue for certain mixes (I stare at the Valois with its 4-resource mix) which is not ideal...

Comment thread Source/Tanks/RealFuelsWindow.cs Outdated
@siimav
siimav merged commit 3129cf2 into KSP-RO:master Jul 27, 2026
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.

Requested and Allocated "fuel" value do not match, potential Floating Point issue?

2 participants