// Adds LED indicators to the small docking port. @PART[dockingPort3]:FOR[IndicatorLights] { @description ^= :(.)$:$0 Indicator lights display crossfeed status.: // We have to re-specify the model for the stock part, because this is // an older part that uses the "mesh =" syntax in its .cfg file instead // of the newer "MODEL" syntax. The "mesh =" syntax doesn't allow having // multiple models as part of the same part, which would prevent this mod // from adding meshes for the indicator lights. MODEL { model = Squad/Parts/Utility/dockingPortJr/model } //------------------------------------------------------------------------- // INDICATOR MESHES //------------------------------------------------------------------------- MODEL { model = IndicatorLights/Meshes/squareLamp2 scale = 0.3, 0.6, 0.3 position = -0.32, 0.06, 0 rotation = 0, 0, 8 } MODEL { model = IndicatorLights/Meshes/squareLamp2 scale = 0.3, 0.6, 0.3 position = 0.32, 0.06, 0 rotation = 0, 0, -8 } MODEL { model = IndicatorLights/Meshes/squareLamp2 scale = 0.3, 0.6, 0.6 position = 0.0, 0.065, -0.30 rotation = -8, 0, 0 } MODEL { model = IndicatorLights/Meshes/squareLamp2 scale = 1.2, 0.6, 0.3 position = 0.0, 0.07, -0.29 rotation = -30, 0, 0 } //------------------------------------------------------------------------- // CONTROLLABLE EMISSIVES //------------------------------------------------------------------------- MODULE { name = ModuleControllableEmissive target = IndicatorLights/Meshes/squareLamp2 emissiveName = indicator } //------------------------------------------------------------------------- // CONTROLLERS //------------------------------------------------------------------------- // Controls the light manually. MODULE { name = ModuleToggleLED activeColor = ModuleDockingCrossfeedIndicator inactiveColor = $Off defaultActionGroup = Light } // This provides detection of the docking port state. We don't specify an // emissiveName here because it's not controlling the light directly (we're // just using it as an input to other modules). MODULE { name = ModuleDockingCrossfeedIndicator } // This detects the docking state. We make this the "root" controller that // actually drives the emissive color, because we want the indicator to blink // when it's acquiring or disengaging, regardless of the toggle setting. // If we're in the "ready" (or docked) state, then we'll take our input // from the toggle. MODULE { name = ModuleDockingStateIndicator emissiveName = indicator readyColor = ModuleToggleLED acquireColor = blink(ModuleDockingCrossfeedIndicator, 100, $Off, 100) disengageColor = blink(ModuleDockingCrossfeedIndicator, 120, $Off, 1080) } }