// Adds LED indicators to the ;arge docking port. @PART[dockingPortLarge]: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/dockingPortSr/model } //------------------------------------------------------------------------- // INDICATOR MESHES //------------------------------------------------------------------------- MODEL { model = IndicatorLights/Meshes/squareLamp2 scale = 0.3, 1, 3 position = 0, 0.156, 0.585 rotation = 0, 0, 0 } MODEL { model = IndicatorLights/Meshes/squareLamp2 scale = 0.3, 1, 2 position = 0, 0.156, -0.585 rotation = 0, 0, 0 } MODEL { model = IndicatorLights/Meshes/squareLamp2 scale = 0.3, 1, 2 position = 0.507, 0.156, 0.2925 rotation = 0, 60, 0 } MODEL { model = IndicatorLights/Meshes/squareLamp2 scale = 0.3, 1, 2 position = -0.507, 0.156, 0.2925 rotation = 0, -60, 0 } MODEL { model = IndicatorLights/Meshes/squareLamp scale = 0.3, 1.6, 1 position = 0, 0.1, -1.25 rotation = 0, 180, 0 } MODEL { model = IndicatorLights/Meshes/squareLamp scale = 0.3, 1.6, 1 position = 1.083, 0.1, 0.625 rotation = 0, 300, 0 } MODEL { model = IndicatorLights/Meshes/squareLamp scale = 0.3, 1.6, 1 position = -1.083, 0.1, 0.625 rotation = 0, 60, 0 } //------------------------------------------------------------------------- // CONTROLLABLE EMISSIVES //------------------------------------------------------------------------- MODULE { name = ModuleControllableEmissive target = IndicatorLights/Meshes/squareLamp emissiveName = indicator } 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 crossfeed. 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) } }