KSPModdingLibs/KSPCommunityFixes

Stock landing gear lights remain active when stowed

JonnyOThan opened this issue ยท 3 comments

When the light action group is on, the white lights on the stock landing gear parts will be active even when the gear is stowed. This is purely cosmetic, but it's a pretty terrible bug (often illuminating the sides of your planes) and much more noticeable when waterfall is installed (see the vertical cones of light in this image):
image

Landing gear deployment is controlled by ModuleWheelDeployment, the light is controlled by ModuleLight.
ModuleLight implements IScalarModule, which is how the light status based on deployment status is handled.
ModuleWheelDeployment know about ModuleLight through the ModuleWheelDeployment.slaveModules KSPField, which should be set to the indice of the ModuleLight.

Issue is that slaveModules isn't set to the right indice in the stock configs for some parts. It is set to 8 in all parts, but :

  • For the SmallGearBay (LY-10), ModuleStatusLight is at indice index 9 (doesn't works correctly)
  • For the GearSmall (LY-35), ModuleStatusLight is at indice index 9 (doesn't works correctly)
  • For the GearMedium (LY-60), ModuleStatusLight is at indice index 8 (works correctly)
  • For the GearLarge (LY-99), ModuleStatusLight is at indice index 8 (works correctly)

This can be easily fixed with a MM patch.

btw the singular of indices is "index" :p

Indeed :P