// Adds LED indicators to the medium docking port. @PART[dockingPort2]: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/dockingPort/model } //------------------------------------------------------------------------- // INDICATOR MESHES //------------------------------------------------------------------------- MODEL //left { model = IndicatorLights/Meshes/squareLamp2 scale = 1, 1, 0.3 position = -0.37696, 0.08, 0.37696 rotation = 0, 46.5, 20 } MODEL //right { model = IndicatorLights/Meshes/squareLamp2 scale = 1, 1, 0.3 position = 0.37696, 0.08, 0.37696 rotation = 0, -46.5, -20 } MODEL //bottom { model = IndicatorLights/Meshes/squareLamp2 scale = 0.3, 1, 1 position = 0, 0.08, -0.5331 rotation = -20, 0, 0 } MODEL //top { model = IndicatorLights/Meshes/squareLamp2 scale = 0.3, 1, 1 position = 0, 0.08, 0.5331 rotation = 20, 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) } }