blowfishpro / B9PartSwitch

A Kerbal Space Program plugin designed to implement switching of part meshes, resources, and nodes
GNU Lesser General Public License v3.0
50 stars 33 forks source link

Switch in flight - tanks should not be filled #56

Closed jsolson closed 6 years ago

jsolson commented 6 years ago

Just getting around to playing with this feature - very nicely done.

One gripe. In the editor normal and expected behavior when switching types should be filling tanks (unless the type is specifically setup not to be filled), but in flight I can't think of any scenario where filling tanks with a resource that was not already present is desirable. This is basically a cheat since tanks can be refilled by switching. I realize I could avoid this by defining the tank types to be empty by default, but that would leave the user with the annoyance of having to manually fill tanks in the editor.

blowfishpro commented 6 years ago

Yeah, Sometimes it's easier to wait and see if it's actually an issue, your experience indicates that it is, so I'll fix this

blowfishpro commented 6 years ago

I should have this fixed, would you mind trying this test build:

https://s3.amazonaws.com/blowfish-ksp-b9partswitch-dev-builds/FixInFlightTankFill/B9PartSwitch_FixInFlightTankFill_299_v1.10.0-34-g1e83c7f.zip

jsolson commented 6 years ago

Works great! I tried a few ways to break it and failed. I could see someone complaining when switching from say LF/Oxidizer to all LF that it shouldn't dump the LF, but you could argue that either way and I'm happy with this.

Low priority request: If it would not be too painful, could we get a flag on subtypes called selectableInFlight (default True) that would control the subtypes visiblity in the in flight list? What I would like to accomplish is a one way switch, fuel to non-fuel, but not back again.

blowfishpro commented 6 years ago

Turned out to be pretty simple to implement. You've now got allowSwitchInFlight on each subtype which defines whether it can be switched to in flight. The GUI should also be disabled if there are no subtypes left to switch to.

https://s3.amazonaws.com/blowfish-ksp-b9partswitch-dev-builds/FixInFlightTankFill/B9PartSwitch_FixInFlightTankFill_305_v1.10.0-35-gf80b052.zip

jsolson commented 6 years ago

Looks good in flight. In the editor the allowSwitchInFlight = False item is hidden in the popup selector. That's going to confuse people.

Little side note: I reach for the new popup every time now when changing tanks in the editor. It definitely wins the ease of use contest over the in-menu widget.

blowfishpro commented 6 years ago

Ugh yeah, should have realized that (it was not intentional). Should be fixed in this build:

https://s3.amazonaws.com/blowfish-ksp-b9partswitch-dev-builds/FixInFlightTankFill/B9PartSwitch_FixInFlightTankFill_306_v1.10.0-36-g8ff1dab.zip

jsolson commented 6 years ago

Perfect. I'm out of suggestions for this feature. I think you can run with this.