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

Investigate module switching #58

Open blowfishpro opened 6 years ago

blowfishpro commented 6 years ago

This is risky but potentially incredibly useful. As far as I can tell there are two patterns

gotmachine commented 6 years ago

It is indeed a very useful feature.

A basic and safe implementation of module switching can be done by enabling/disabling already-defined modules, setting the "isEnabled" and "Enabled" properties. It was implemented in the Kerbalism Configure partmodule. Some partmodules may cause problems but for the vast majority of them this was working flawlessly. It can even be used to define the same module twice with different values.

See https://github.com/blowfishpro/B9PartSwitch/pull/100 for a prototype