-
Notifications
You must be signed in to change notification settings - Fork 32
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
Suggestion for fixing massOverride #126
Conversation
FerramAerospaceResearch/LEGACYferram4/FARWingAerodynamicModel.cs
Outdated
Show resolved
Hide resolved
FerramAerospaceResearch/LEGACYferram4/FARWingAerodynamicModel.cs
Outdated
Show resolved
Hide resolved
Thanks, I didn't expect KSP to have a problem with nullable values |
|
The setter needs to modify field visibility so it has to stay but the modifications are still missing. |
The setter no longer modifies the fields; it only sets the value to |
The setter needs to have Fields[nameof(curWingMass)].guiActiveEditor = value is not null;
Fields[nameof(massMultiplier)].guiActiveEditor = value is not null; to maintain correctness |
Oh, so the Field modifications should be in both the setter and in |
Yeah, and it may be easier to call setter in |
Thanks |
Glad I could help! |
@dkavolis Do note that I did not push recompiled .dll's |
Found a way to make massOverride work, but since KSP doesn't like a value being null (the default with the previous
float? massOverride
), I usedfloat.MinValue
instead.There is likely a much better way to do this.