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

Public Member Functions

void Add (PartModule module)
 
void Clear ()
 Clears the list and destroys any part modules More...
 
bool Contains (string className)
 Does this list contain the action of given name? More...
 
bool Contains (int classID)
 Does this list contain the action of given name? More...
 
bool Contains (uint persistentId)
 Does this list contain a module with this persistentId? More...
 
bool Contains< T > ()
 Does the list contain a partmodule of (or derived from) the given template type? More...
 
IEngineStatus FindEngineInterface (string engineName, int engineIndex, bool preferMultiMode)
 
IEngineStatus FindEngineNearby (string engineName, int engineIndex, bool preferMultiMode)
 
List< PartModule >.Enumerator GetEnumerator ()
 
PartModule GetModule (int index)
 
PartModule GetModule (string moduleName)
 
GetModule< T > (int index=0)
 Gets module of the given template type. Optional index param (0-based) for getting later than first of the type. More...
 
List< T > GetModules< T > ()
 
IScalarModule GetScalarModule (string name)
 
List< IScalarModuleGetScalarModules (string name)
 
int IndexOf (PartModule module)
 
 PartModuleList (Part part)
 
void Remove (PartModule module)
 
bool Send (string actionName)
 Sends an action to one of the actions in this list if any match More...
 
bool Send (int actionID)
 Sends an action to one of the actions in this list if any match More...
 
bool Send (string actionName, BaseEventDetails actionData)
 Sends an action to one of the actions in this list if any match More...
 
bool Send (int actionID, BaseEventDetails actionData)
 Sends an action to one of the actions in this list if any match More...
 
bool SendDefault ()
 Fires the default action if it is set More...
 
bool SendDefault (BaseEventDetails actionData)
 Fires the default action if it is set More...
 

Properties

int Count [get]
 
PartModule this[int index] [get, set]
 
PartModule this[string className] [get]
 
PartModule this[uint persistentId] [get]
 Get a partModule More...
 

Constructor & Destructor Documentation

PartModuleList.PartModuleList ( Part  part)
inline

Member Function Documentation

void PartModuleList.Add ( PartModule  module)
inline
void PartModuleList.Clear ( )
inline

Clears the list and destroys any part modules

bool PartModuleList.Contains ( string  className)
inline

Does this list contain the action of given name?

Parameters
classNameExposed action name
Returns
True/false
bool PartModuleList.Contains ( int  classID)
inline

Does this list contain the action of given name?

Parameters
actionNameExposed action name
Returns
True/false
bool PartModuleList.Contains ( uint  persistentId)
inline

Does this list contain a module with this persistentId?

Parameters
persistentIdPersistentId of the module
Returns
True/false
bool PartModuleList.Contains< T > ( )
inline

Does the list contain a partmodule of (or derived from) the given template type?

Template Parameters
T
Returns
Type Constraints
T :PartModule 
IEngineStatus PartModuleList.FindEngineInterface ( string  engineName,
int  engineIndex,
bool  preferMultiMode 
)
inline

< Check multimode first.

IEngineStatus PartModuleList.FindEngineNearby ( string  engineName,
int  engineIndex,
bool  preferMultiMode 
)
inline

< first, try to find an engine on this same part

< if not, try to find an engine on the parent part

< if even that failed, try to find engines on the child parts

List<PartModule>.Enumerator PartModuleList.GetEnumerator ( )
inline
PartModule PartModuleList.GetModule ( int  index)
inline
PartModule PartModuleList.GetModule ( string  moduleName)
inline
T PartModuleList.GetModule< T > ( int  index = 0)
inline

Gets module of the given template type. Optional index param (0-based) for getting later than first of the type.

Template Parameters
T
Parameters
index
Returns
Type Constraints
T :PartModule 
List<T> PartModuleList.GetModules< T > ( )
inline
Type Constraints
T :class 
IScalarModule PartModuleList.GetScalarModule ( string  name)
inline
List<IScalarModule> PartModuleList.GetScalarModules ( string  name)
inline
int PartModuleList.IndexOf ( PartModule  module)
inline
void PartModuleList.Remove ( PartModule  module)
inline
bool PartModuleList.Send ( string  actionName)
inline

Sends an action to one of the actions in this list if any match

Parameters
actionNameAction name to invoke
Returns
true/false depending on if action was successful
bool PartModuleList.Send ( int  actionID)
inline

Sends an action to one of the actions in this list if any match

Parameters
actionNameAction name to invoke
Returns
true/false depending on if action was successful
bool PartModuleList.Send ( string  actionName,
BaseEventDetails  actionData 
)
inline

Sends an action to one of the actions in this list if any match

Parameters
actionNameAction name to invoke
actionDataAction data class (null if none)
Returns
true/false depending on if action was successful
bool PartModuleList.Send ( int  actionID,
BaseEventDetails  actionData 
)
inline

Sends an action to one of the actions in this list if any match

Parameters
actionNameAction name to invoke
actionDataAction data class (null if none)
Returns
true/false depending on if action was successful
bool PartModuleList.SendDefault ( )
inline

Fires the default action if it is set

Parameters
actionDataAction data class (null if none)
Returns
true/false depending on if action was successful
bool PartModuleList.SendDefault ( BaseEventDetails  actionData)
inline

Fires the default action if it is set

Parameters
actionDataAction data class (null if none)
Returns
true/false depending on if action was successful

Property Documentation

int PartModuleList.Count
get
PartModule PartModuleList.this[int index]
getset
PartModule PartModuleList.this[string className]
get
PartModule PartModuleList.this[uint persistentId]
get

Get a partModule

Parameters
persistentIdPersistentId of the module
Returns

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