Add enabled attribute to model data (default true)
Used for part switching to disable a particular piece of the fairing (since eliminating the node wouldn't do anything)
Send OnPartModelChanged event so other modules can respond to changes in the model
Listen for ModuleDataChanged to rebuild fairing
Use requestNotifyFARToRevoxelize and requestRecalculateDragCubes attributes of event details if present rather than recalculating aero properties ourself, that ensures it's only done once per cycle
Use better method of recalculating drag cubes
Send/listen for DragCubesWereRecalculated and FarWasNotifiedToRevoxelize to make sure actions are only done once per cycle
enabled
attribute to model data (defaulttrue
)OnPartModelChanged
event so other modules can respond to changes in the modelModuleDataChanged
to rebuild fairingrequestNotifyFARToRevoxelize
andrequestRecalculateDragCubes
attributes of event details if present rather than recalculating aero properties ourself, that ensures it's only done once per cycleDragCubesWereRecalculated
andFarWasNotifiedToRevoxelize
to make sure actions are only done once per cycle