Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
ModuleLight Class Reference
Inheritance diagram for ModuleLight:
PartModule IResourceConsumer IScalarModule

Public Member Functions

void BlinkLightOff ()
 Turn off the blink functionality. More...
 
void BlinkLightOn ()
 Turn on the blink functionality. More...
 
void FixedUpdate ()
 
List< PartResourceDefinitionGetConsumedResources ()
 
override Color GetCurrentColor ()
 Returns the current part module color. More...
 
override string GetInfo ()
 Returns formatted string of additional data for use in the VAB and SPH More...
 
override string GetModuleDisplayName ()
 Override this to provide a Localized version of the PartModules Name for UI components More...
 
bool IsMoving ()
 
void LightOffAction (KSPActionParam param)
 
void LightOnAction (KSPActionParam param)
 
void LightsOff ()
 
void LightsOn ()
 
override void OnAwake ()
 Method fires once the module has been added to the part. Use for first time setup. Module will not have loaded fully by this point More...
 
override void OnColorChanged (Color color, string id)
 Implements color changes More...
 
override void OnColorChanged (Color color)
 Implements color changes when the specific color picker is not relevant More...
 
override void OnInventoryModeDisable ()
 This method will be called when this modules part and itself is first disabled (when it is not attached to a vessel) when created in Inventory/Construction mode. More...
 
override void OnLoad (ConfigNode node)
 Use OnLoad to load any additional data from the ConfigNode provided More...
 
override void OnModuleAdjusterRemoved (AdjusterPartModuleBase adjuster)
 Perform processing specific to this part module when an adjuster is removed. More...
 
override void OnStart (PartModule.StartState state)
 
override List< Color > PresetColors ()
 Preset colors received for any part module. By default, returns only black, override to make your own selection. More...
 
void SetBlinkState (bool state)
 Set Blink State to the new state More...
 
void SetFlareColor (Color c)
 Disables this light's flare, if it has one More...
 
void SetLightState (bool state, bool isCounterPart=false)
 Set the lights on and off. More...
 
void SetLightState (bool state, Color originalLightColor, bool isCounterPart=false)
 Set the lights on and off. More...
 
void SetScalar (float t)
 Call to tell the module to assume the given state. Mind transition may not happen instantly. Check GetScalar for the actual state of the thing. More...
 
void SetUIRead (bool state)
 Call to set whether or not the module will display its own UI. Read and Write define which kinds of information are allowed to be displayed More...
 
void SetUIWrite (bool state)
 Call to set whether or not the module will display its own UI. Read and Write define which kinds of information are allowed to be displayed More...
 
void ToggleBlink ()
 Turn on and off the blink functionality. More...
 
void ToggleLightAction (KSPActionParam param)
 
void ToggleLightAction (KSPActionType action)
 Turns the light on or off. More...
 
void ToggleLights ()
 Toggle the lights on and off. More...
 
void UpdateLightColors ()
 
- Public Member Functions inherited from PartModule
void AddPartModuleAdjuster (AdjusterPartModuleBase newAdjuster)
 Call this to add an adjuster to this part module. More...
 
void AddPartModuleAdjusterList (List< AdjusterPartModuleBase > moduleAdjusters)
 Applies the appropriate module adjusters. Performs checks to make sure that the adjusters are valid too. More...
 
bool AppliedUpgrades ()
 Returns true if upgrades are applied More...
 
void ApplyAdjustersOnStart ()
 Called when a part module is loaded and applies all of the currently loaded adjusters. More...
 
virtual void ApplyUpgradeNode (List< string > appliedUps, ConfigNode node, bool doLoad)
 Applies the upgrades to a confignode. Will either copy the upgrades back to the node or (if doLoad) calls load/onload on it. More...
 
virtual bool ApplyUpgrades (StartState state)
 Will find and apply upgrades. Called during Part's ModulesOnStart, before a module's OnStart. More...
 
void Awake ()
 
delegate bool boolPMApplyUpgrades (PartModule pm, StartState state)
 
delegate bool boolPMBoolDelegate (PartModule pm, bool apply)
 
void ClearPersistentId ()
 Clear the modules persistentId More...
 
void Copy (PartModule fromModule)
 
virtual void DemoteToPhysicslessPart ()
 This method will be called from Part class DemoteToPhysicslessPart when the part is being converted from physical to physicsless part. It is called before the joints and rigidbodies are destroyed. More...
 
virtual bool FindUpgrades (bool fillApplied, ConfigNode node=null)
 Find applicable upgrades to the partmodule (isunlocked and isenabled) and add to the upgradesApplied list. Pass true if you want to add the upgrades to upgradesApplied, false if you just want to know if at least one upgrade is applicable (unlocked rather than enabled) More...
 
virtual Color GetCurrentColor (string fieldName)
 Returns the current part module color for a field where usespe. More...
 
uint GetPersistenActiontId ()
 Get the modules persistentID, and create one if it doesnt already have one More...
 
uint GetPersistentId ()
 Get the modules persistentID, and create one if it doesnt already have one More...
 
virtual string GetStagingDisableText ()
 
virtual string GetStagingEnableText ()
 
virtual string GetUpgradeInfo ()
 Called by Upgrade Stats dialog More...
 
bool HasUpgrades ()
 Returns true if upgrades exist for the partmodule More...
 
virtual bool IsStageable ()
 Should this module be counted when seeing whether to have a stack icon present? Override in a module for custom behavior; otherwise returns true if the module (or something the module inherits from above PartModule itself) overrides OnActive() More...
 
bool IsValidContractObjective (string objectiveType)
 Returns if, for example, an antenna part module qualifies as an antenna for contracts. More...
 
void Load (ConfigNode node)
 
virtual void LoadUpgrades (ConfigNode node)
 Loads module-relevant upgrades from the partmodule confignode More...
 
uint NewPersistentId ()
 Reset the modules persistentId to a new number More...
 
virtual void OnActive ()
 Called when the part is set active (after unpacking etc) More...
 
virtual void OnConstructionModeFixedUpdate ()
 This method will be called when in EVA Construction mode and this part and itself is disabled (when it is not attached to a vessel) every FixedUpdate(). More...
 
virtual void OnConstructionModeUpdate ()
 This method will be called when in EVA Construction mode and this part and itself is disabled (when it is not attached to a vessel) every Update(). More...
 
virtual void OnCopy (PartModule fromModule)
 Use OnCopy to copy any additional data from the PartModule provided More...
 
virtual void OnFixedUpdate ()
 Called every physics/fixed frame that the part is active More...
 
virtual void OnIconCreate ()
 Method fires just before components are stripped from the gameobject to make it an icon. (The part is instantiated and then various components like Part, PartModule, EffectBehaviour, Colliders, Particles, etc are stripped and then it's set as the icon prefab. This lets PartModules do stuff to the model right before that happens. More...
 
virtual void OnInactive ()
 Called before the part goes inactive (after packing etc) More...
 
virtual void OnInitialize ()
 Called on all modules after all parts are loaded but before they give the ship to the game More...
 
virtual void OnInventoryModeEnable ()
 This method will be called when this modules part and itself is first enabled (when it is attached to a vessel) when created in Inventory/Construction mode. More...
 
void OnModuleAdjusterAddedWrapper (AdjusterPartModuleBase adjuster)
 Wrapper to check the mission expansion availability before performing processing specific to this part module when an adjuster is added. More...
 
virtual void OnPartCreatedFomInventory (ModuleInventoryPart moduleInventoryPart)
 This method is called when a part is being taken out from a slot while being in EVAConstruction mode. More...
 
virtual void OnSave (ConfigNode node)
 Use OnSave to serialize additional module information into the ConfigNode provided More...
 
virtual void OnStart (StartState state)
 Called when the part starts. The StartState gives an indication of where in flight you are. All values may not be plugged in! More...
 
virtual void OnStartBeforePartAttachJoint (StartState state)
 Called in flight scene in Part.Start just before the Part attachnode joints are created. More...
 
virtual void OnStartFinished (StartState state)
 Called when the part finishes starting. The StartState gives an indication of where in flight you are. All values may not be plugged in! More...
 
virtual void OnStoredInInventory (ModuleInventoryPart moduleInventoryPart)
 Called when the part is stored in an inventory. More...
 
virtual void OnUpdate ()
 Called every frame that the part is active More...
 
virtual void OnWasCopied (PartModule copyPartModule, bool asSymCounterpart)
 Called when the PartModule was copied, through Alt+Copy or symmetry More...
 
virtual void OnWillBeCopied (bool asSymCounterpart)
 Called when the PartModule is about to be copied, through Alt+Copy or symmetry More...
 
virtual bool OnWillBeMirrored (ref Quaternion rotation, AttachNode selPartNode, Part partParent)
 This is called in the Editor scene when a symmetry copy of a part is being positioned. Only called on the symmetry parts and only when symmetry mode is set to Mirror. It allows the mirror rotation to be changed and returned before being applied to the symmetry copy part.

Parameters
rotationThe current calculated rotation. Will be updated if method returns true.
selPartNodeThe attachnode.
partParentThe part that will become this part's parent.
Returns
True if the rotation was changed. Otherwise will return false.
More...
 
virtual string PrintUpgrades ()
 
virtual void PromoteToPhysicalPart ()
 This method will be called from Part class PromoteToPhysicalPart when the part is being converted from physicsless to physical part. More...
 
void RemovePartModuleAdjuster (AdjusterPartModuleBase oldAdjuster)
 Call this to remove an adjuster from this part module. More...
 
void RemovePartModuleAdjusterList (List< AdjusterPartModuleBase > moduleAdjusters)
 Removes the appropriate module adjusters. Performs checks to make sure that the adjusters are valid too. More...
 
void Save (ConfigNode node)
 
virtual void SetStaging (bool newValue)
 Run by the part's staging toggle handler, sets staging on modules on symmetry counterparts. More...
 
void SetStagingState (bool newState)
 Set the staging enabled bool for this module. More...
 
virtual bool StagingEnabled ()
 Gets current staging status (is staging enabled for this module) Override me! More...
 
virtual bool StagingToggleEnabledEditor ()
 
virtual bool StagingToggleEnabledFlight ()
 
void ToggleStaging ()
 
virtual void UpdateStagingToggle ()
 Updates the staging toggle More...
 
delegate void voidPMApplyNodeDelegate (PartModule pm, List< string > appliedUps, ConfigNode node, bool doLoad)
 
delegate void voidPMDelegate (PartModule pm)
 
delegate void voidPMNodeDelegate (PartModule pm, ConfigNode node)
 

Public Attributes

string animationName = "LightAnimation"
 
float blinkMax = 2f
 Maximum blink rate, this is setup in the cfg. More...
 
float blinkMin = 0.2f
 Minimum blink rate, this is setup in the cfg. More...
 
float blinkRate = 1f
 This is the desired current Blink rate set by the user. More...
 
bool blinkState = false
 Is the light in its off or on state when blinking More...
 
List< float > brightnessLevels
 
bool canBlink = false
 Can this light blink? this is setup in the cfg. More...
 
bool canPitch = false
 Can this light pitch? this is setup in the cfg. More...
 
bool canRotate = false
 Can this light rotate? this is setup in the cfg. More...
 
bool castLight = true
 If true casts a light source (and shadows). If false does not cast a light source. More...
 
string colorChanger
 
bool disableColorPicker = true
 
string displayStatus = Localizer.Format("#autoLOC_219034")
 
string flareRendererName = "Flare"
 This is the Name of the flare transform. If not specified, it means the light has no flare. More...
 
bool isBlinking = false
 Is the light blinking. More...
 
bool isOn = false
 
float lightB = 0.875f
 
float lightBrightenSpeed = 0.3f
 
float lightDimSpeed = 0.8f
 
float lightG = 0.875f
 
string lightMeshRendererName
 This is the name of the meshrenderer transform for the light emissive. If not specified or found will use the first renderer found in the part model. If useAnimationDim is true this transform will be animated. More...
 
string lightName = "toggleableLight"
 This is the Name of the light transform. More...
 
float lightR = 0.875f
 
List< Lightlights
 
List< LightStructlightsList = null
 The list of extra lights loaded from nodes that are present in this part. More...
 
string moduleID = "lightModule"
 
string movementPitchTransformName = "movementPitchTransformName"
 The name of the transform that we use to pitch if we are doing independent axis. More...
 
string movementRotateTransformName = "movementRotateTransformName"
 The name of the transform that we use to rotate if we are doing independent axis. More...
 
Transform movementTransform
 The transform that we use to rotate and pitch. More...
 
string movementTransformName = "movementTransformName"
 The name of the transform that we use to rotate or pitch. More...
 
Transform movementTransformPitch
 The transform that we use to pitch. More...
 
Transform movementTransformRotate
 The transform that we use to rotate. More...
 
float pitchAngle = 0f
 PAW pitch slide option. More...
 
string pitchAxisName = "Y"
 The Axis of the light rotation from the model. More...
 
float pitchMax = 360f
 Maximum pitch angle, this is setup in the cfg. More...
 
float pitchMin = 0f
 Minimun pitch angle, this is setup in the cfg. More...
 
float resourceAmount = 0.01f
 
string resourceName = "ElectricCharge"
 
string rotateAxisName = "Z"
 The Axis of the light rotation from the model. More...
 
float rotateMax = 360f
 Maximum angle of rotation, this is setup in the cfg. More...
 
float rotateMin = 0f
 Minimun angle of rotation, this is setup in the cfg. More...
 
float rotationAngle = 0f
 PAW rotation slide option. More...
 
string status = "Nominal"
 
bool uiWriteLock = false
 
bool useAnimationDim = false
 
bool useAutoDim = false
 
bool useResources = false
 
- Public Attributes inherited from PartModule
bool isEnabled = true
 
bool moduleIsEnabled = true
 
string moduleName
 
bool overrideStagingIconIfBlank = true
 
ModuleResourceHandler resHandler = new ModuleResourceHandler()
 
bool showUpgradesInModuleInfo = false
 
ProtoPartModuleSnapshot snapshot
 
string stagingDisableText = ""
 
bool stagingEnabled = true
 
string stagingEnableText = ""
 
bool stagingToggleEnabledEditor = false
 
bool stagingToggleEnabledFlight = false
 
List< ConfigNodeupgrades
 
List< string > upgradesApplied = new List<string>()
 
bool upgradesApply = true
 
bool upgradesAsk = true
 

Protected Member Functions

float ApplyIntensityAdjustments (float intensity)
 
void ModifyLightVector (object field)
 Function that rotates the light. More...
 
override void OnModuleAdjusterAdded (AdjusterPartModuleBase adjuster)
 Perform processing specific to this part module when an adjuster is added. More...
 
- Protected Member Functions inherited from PartModule
ConfigNode GetUpgrade (string name)
 
virtual void LoadUpgradesApplied (List< string > applieds, ConfigNode node)
 Load the applied upgrade names More...
 
virtual void SaveUpgradesApplied (ConfigNode node)
 Save the applied upgrades. More...
 
IEnumerator UpgradeWaitForScenarioModules ()
 

Protected Attributes

BaseAxisField blinkRateAxisField
 
UI_FloatRange blinkRateUIField
 
BaseAxisField pitchAngleAxisField
 
UI_FloatRange pitchAngleUIField
 
BaseAxisField rotationAngleAxisField
 
UI_FloatRange rotationAngleUIField
 

Properties

bool CanMove [get]
 
float GetScalar [get]
 
EventData< float, float > OnMoving [get]
 
EventData< float > OnStop [get]
 
string ScalarModuleID [get]
 
- Properties inherited from PartModule
BaseActionList Actions [get]
 
int ClassID [get]
 
string ClassName [get]
 
List< AdjusterPartModuleBaseCurrentModuleAdjusterList [get]
 List of all the module adjusters that are currently active on this part module. More...
 
BaseEventList Events [get]
 
BaseFieldList Fields [get]
 
string GUIName [get]
 
bool HasAdjusters [get]
 Has this part module been adjusted? More...
 
ReflectedAttributes ModuleAttributes [get, set]
 
Part part [get, set]
 
uint PersistentActionsId [get, set]
 A unique identifier for each vessel including from when it was Shipconstruct More...
 
uint PersistentId [get]
 A unique identifier for each vessel including from when it was Shipconstruct More...
 
Vessel vessel [get]
 
- Properties inherited from IScalarModule
bool CanMove [get]
 A flag stating whether or not the module is able to change state at all. More...
 
float GetScalar [get]
 
EventData< float, float > OnMoving [get]
 
EventData< float > OnStop [get]
 
string ScalarModuleID [get]
 

Additional Inherited Members

- Public Types inherited from PartModule
enum  PartUpgradeState { PartUpgradeState.NONE, PartUpgradeState.LOCKED, PartUpgradeState.AVAILABLE }
 
enum  StartState {
  StartState.None = 0, StartState.Editor = 1, StartState.PreLaunch = 2, StartState.Landed = 4,
  StartState.Docked = 8, StartState.Flying = 16, StartState.Splashed = 32, StartState.SubOrbital = 64,
  StartState.Orbital = 128
}
 
- Static Public Member Functions inherited from PartModule
static ReflectedAttributes GetReflectedAttributes (Type partModuleType)
 
static PartUpgradeState UpgradesAvailable (Part part)
 Returns true if at least one module on the part has at least one upgrade available (isUnlocked) More...
 
static PartUpgradeState UpgradesAvailable (Part part, ConfigNode node)
 Returns true if at least one module on the part has at least one upgrade available (isUnlocked) More...
 
- Static Public Attributes inherited from PartModule
static voidPMApplyNodeDelegate ApplyUpgradeNodeDel
 
static boolPMApplyUpgrades ApplyUpgradesDel
 
static bool ApplyUpgradesEditorAuto = true
 
static boolPMBoolDelegate FindUpgradesDel
 
static voidPMNodeDelegate LoadExpansionNodes
 Hook for loading extra nodes common to all part modules. More...
 
static voidPMNodeDelegate LoadUpgradesDel
 
static voidPMNodeDelegate SaveExpansionNodes
 Hook for saving extra nodes common to all part modules. More...
 
static voidPMDelegate SetupExpansion
 Hook for performing extra setup common to all part modules. More...
 
static string UpgradesAvailableString = "#autoLOC_6002273"
 
static string UpgradesLockedString = "#autoLOC_6002274"
 
- Static Protected Attributes inherited from PartModule
static Dictionary< string,
ConfigNode
exclusives = new Dictionary<string, ConfigNode>()
 
static Dictionary< Type,
ReflectedAttributes
reflectedAttributeCache = new Dictionary<Type, ReflectedAttributes>()
 

Member Function Documentation

float ModuleLight.ApplyIntensityAdjustments ( float  intensity)
inlineprotected
void ModuleLight.BlinkLightOff ( )
inline

Turn off the blink functionality.

void ModuleLight.BlinkLightOn ( )
inline

Turn on the blink functionality.

void ModuleLight.FixedUpdate ( )
inline
List<PartResourceDefinition> ModuleLight.GetConsumedResources ( )
inline

Implements IResourceConsumer.

override Color ModuleLight.GetCurrentColor ( )
inlinevirtual

Returns the current part module color.

Returns

Reimplemented from PartModule.

override string ModuleLight.GetInfo ( )
inlinevirtual

Returns formatted string of additional data for use in the VAB and SPH

Returns

Reimplemented from PartModule.

override string ModuleLight.GetModuleDisplayName ( )
inlinevirtual

Override this to provide a Localized version of the PartModules Name for UI components

Returns

Reimplemented from PartModule.

bool ModuleLight.IsMoving ( )
inline

Implements IScalarModule.

void ModuleLight.LightOffAction ( KSPActionParam  param)
inline
void ModuleLight.LightOnAction ( KSPActionParam  param)
inline
void ModuleLight.LightsOff ( )
inline
void ModuleLight.LightsOn ( )
inline
void ModuleLight.ModifyLightVector ( object  field)
inlineprotected

Function that rotates the light.

override void ModuleLight.OnAwake ( )
inlinevirtual

Method fires once the module has been added to the part. Use for first time setup. Module will not have loaded fully by this point

Reimplemented from PartModule.

override void ModuleLight.OnColorChanged ( Color  color,
string  id 
)
inlinevirtual

Implements color changes

Parameters
colorInput Color
pickerIDSpecific color picker ID

Reimplemented from PartModule.

override void ModuleLight.OnColorChanged ( Color  color)
inlinevirtual

Implements color changes when the specific color picker is not relevant

Parameters
colorInput Color

Reimplemented from PartModule.

override void ModuleLight.OnInventoryModeDisable ( )
inlinevirtual

This method will be called when this modules part and itself is first disabled (when it is not attached to a vessel) when created in Inventory/Construction mode.

Reimplemented from PartModule.

override void ModuleLight.OnLoad ( ConfigNode  node)
inlinevirtual

Use OnLoad to load any additional data from the ConfigNode provided

Parameters
node

< Get the hash for our resource

Reimplemented from PartModule.

override void ModuleLight.OnModuleAdjusterAdded ( AdjusterPartModuleBase  adjuster)
inlineprotectedvirtual

Perform processing specific to this part module when an adjuster is added.

Parameters
adjusterAdjuster which will be applied to part module.

Reimplemented from PartModule.

override void ModuleLight.OnModuleAdjusterRemoved ( AdjusterPartModuleBase  adjuster)
inlinevirtual

Perform processing specific to this part module when an adjuster is removed.

Parameters
adjusterAdjuster which is being removed from part module.

Reimplemented from PartModule.

override void ModuleLight.OnStart ( PartModule.StartState  state)
inline
override List<Color> ModuleLight.PresetColors ( )
inlinevirtual

Preset colors received for any part module. By default, returns only black, override to make your own selection.

Returns

Reimplemented from PartModule.

void ModuleLight.SetBlinkState ( bool  state)
inline

Set Blink State to the new state

Returns
void ModuleLight.SetFlareColor ( Color  c)
inline

Disables this light's flare, if it has one

void ModuleLight.SetLightState ( bool  state,
bool  isCounterPart = false 
)
inline

Set the lights on and off.

Parameters
stateThe state of the light, true = on, false = off
isCounterPartThe part calling this functions is a symmetry part?
void ModuleLight.SetLightState ( bool  state,
Color  originalLightColor,
bool  isCounterPart = false 
)
inline

Set the lights on and off.

Parameters
stateThe state of the light, true = on, false = off
originalLightColorThe original light color
isCounterPartThe part calling this functions is a symmetry part?
void ModuleLight.SetScalar ( float  t)
inline

Call to tell the module to assume the given state. Mind transition may not happen instantly. Check GetScalar for the actual state of the thing.

Parameters
s

Implements IScalarModule.

void ModuleLight.SetUIRead ( bool  state)
inline

Call to set whether or not the module will display its own UI. Read and Write define which kinds of information are allowed to be displayed

Implements IScalarModule.

void ModuleLight.SetUIWrite ( bool  state)
inline

Call to set whether or not the module will display its own UI. Read and Write define which kinds of information are allowed to be displayed

Implements IScalarModule.

void ModuleLight.ToggleBlink ( )
inline

Turn on and off the blink functionality.

void ModuleLight.ToggleLightAction ( KSPActionParam  param)
inline
void ModuleLight.ToggleLightAction ( KSPActionType  action)
inline

Turns the light on or off.

Parameters
actionEnum that specifies whether the light should be turned on or off.
void ModuleLight.ToggleLights ( )
inline

Toggle the lights on and off.

void ModuleLight.UpdateLightColors ( )
inline

Member Data Documentation

string ModuleLight.animationName = "LightAnimation"
float ModuleLight.blinkMax = 2f

Maximum blink rate, this is setup in the cfg.

float ModuleLight.blinkMin = 0.2f

Minimum blink rate, this is setup in the cfg.

float ModuleLight.blinkRate = 1f

This is the desired current Blink rate set by the user.

BaseAxisField ModuleLight.blinkRateAxisField
protected
UI_FloatRange ModuleLight.blinkRateUIField
protected
bool ModuleLight.blinkState = false

Is the light in its off or on state when blinking

List<float> ModuleLight.brightnessLevels
bool ModuleLight.canBlink = false

Can this light blink? this is setup in the cfg.

bool ModuleLight.canPitch = false

Can this light pitch? this is setup in the cfg.

bool ModuleLight.canRotate = false

Can this light rotate? this is setup in the cfg.

bool ModuleLight.castLight = true

If true casts a light source (and shadows). If false does not cast a light source.

string ModuleLight.colorChanger
bool ModuleLight.disableColorPicker = true
string ModuleLight.displayStatus = Localizer.Format("#autoLOC_219034")
string ModuleLight.flareRendererName = "Flare"

This is the Name of the flare transform. If not specified, it means the light has no flare.

bool ModuleLight.isBlinking = false

Is the light blinking.

bool ModuleLight.isOn = false
float ModuleLight.lightB = 0.875f
float ModuleLight.lightBrightenSpeed = 0.3f
float ModuleLight.lightDimSpeed = 0.8f
float ModuleLight.lightG = 0.875f
string ModuleLight.lightMeshRendererName

This is the name of the meshrenderer transform for the light emissive. If not specified or found will use the first renderer found in the part model. If useAnimationDim is true this transform will be animated.

string ModuleLight.lightName = "toggleableLight"

This is the Name of the light transform.

float ModuleLight.lightR = 0.875f
List<Light> ModuleLight.lights
List<LightStruct> ModuleLight.lightsList = null

The list of extra lights loaded from nodes that are present in this part.

string ModuleLight.moduleID = "lightModule"
string ModuleLight.movementPitchTransformName = "movementPitchTransformName"

The name of the transform that we use to pitch if we are doing independent axis.

string ModuleLight.movementRotateTransformName = "movementRotateTransformName"

The name of the transform that we use to rotate if we are doing independent axis.

Transform ModuleLight.movementTransform

The transform that we use to rotate and pitch.

Will be null if axis are independant

string ModuleLight.movementTransformName = "movementTransformName"

The name of the transform that we use to rotate or pitch.

Transform ModuleLight.movementTransformPitch

The transform that we use to pitch.

Will be null if we using same transform for both rotate and pitch - or no movement

Transform ModuleLight.movementTransformRotate

The transform that we use to rotate.

Will be null if we using same transform for both rotate and pitch - or no movement

float ModuleLight.pitchAngle = 0f

PAW pitch slide option.

BaseAxisField ModuleLight.pitchAngleAxisField
protected
UI_FloatRange ModuleLight.pitchAngleUIField
protected
string ModuleLight.pitchAxisName = "Y"

The Axis of the light rotation from the model.

float ModuleLight.pitchMax = 360f

Maximum pitch angle, this is setup in the cfg.

float ModuleLight.pitchMin = 0f

Minimun pitch angle, this is setup in the cfg.

float ModuleLight.resourceAmount = 0.01f
string ModuleLight.resourceName = "ElectricCharge"
string ModuleLight.rotateAxisName = "Z"

The Axis of the light rotation from the model.

float ModuleLight.rotateMax = 360f

Maximum angle of rotation, this is setup in the cfg.

float ModuleLight.rotateMin = 0f

Minimun angle of rotation, this is setup in the cfg.

float ModuleLight.rotationAngle = 0f

PAW rotation slide option.

BaseAxisField ModuleLight.rotationAngleAxisField
protected
UI_FloatRange ModuleLight.rotationAngleUIField
protected
string ModuleLight.status = "Nominal"
bool ModuleLight.uiWriteLock = false
bool ModuleLight.useAnimationDim = false
bool ModuleLight.useAutoDim = false
bool ModuleLight.useResources = false

Property Documentation

bool ModuleLight.CanMove
get
float ModuleLight.GetScalar
get
EventData<float, float> ModuleLight.OnMoving
get
EventData<float> ModuleLight.OnStop
get
string ModuleLight.ScalarModuleID
get

The documentation for this class was generated from the following file: