Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties | List of all members
EditorLogicBase Class Reference

Base class for Editor Logic More...

Inheritance diagram for EditorLogicBase:
EditorLogic EVAConstructionModeEditor

Static Public Member Functions

static List< PartFindPartsInChildren (Part part)
 Finds all parts in the child hierarchy of the given part, part included More...
 
static void FindPartsInChildren (ref List< Part > parts, Part part)
 Finds all parts in the child hierarchy of the given part, part included More...
 

Public Attributes

EditorScreen editorScreen
 
Vector3 selPartGrabOffset
 

Protected Member Functions

void AssignAttachIcon (Part part, AttachNode node, bool stackNodes, bool srfNodes, bool dockNodes)
 
void CreateSelectedPartIcon ()
 Creates a part icon for the current selected part when it's not null and it's a cargo part. More...
 
void displayAttachNodeIcons (List< Part > parts, Part selectedPart, bool stackNodes, bool srfNodes, bool dockNodes)
 Displays all attachNodes currently available for attaching. (depending on rules) (false, false disables the node icons) More...
 
float FindPartSurface (Part p, Vector3 origin, Vector3 direction, Vector3 fromParent, RaycastHit hit, out Vector3 srfNormal)
 Find the surface of the part using its enabled colliders More...
 
float FindPartSurface (Part p, Vector3 origin, Vector3 direction, Vector3 fromParent, RaycastHit hit, out Vector3 srfNormal, int layerMask)
 Find the surface of the part using its enabled colliders More...
 
void handleAttachNodeIcons (Part part, bool stackNodes, bool srfNodes, bool dockNodes)
 
void handleChildNodeIcons (Part part)
 
bool PartInHierarchy (Part part, Part tgtPart)
 Detects whether the given part has the target part in it's child hierarchy. Used to detect and prevent parts connecting to their own childs and creating hierarchy loops. More...
 
void partRotationInputUpdate ()
 
virtual void partRotationResetUpdate ()
 

Static Protected Member Functions

static void clearAttachNodes (Part part, Part otherPart)
 

Protected Attributes

GameObject attachNodePrefab
 
bool checkInputLocks = true
 
KerbalFSM fsm = null
 
ScreenMessage interactMsg
 
bool isCurrentPartFlag
 
ScreenMessage modeMsg
 
bool partTweaked
 
CompoundPart selectedCompoundPart
 
Part selectedPart
 
Quaternion stackRotation
 

Static Protected Attributes

static string cacheAutoLOC_125488
 
static string cacheAutoLOC_125583
 
static string cacheAutoLOC_125724
 
static string cacheAutoLOC_125784
 
static string cacheAutoLOC_125798
 
static string cacheAutoLOC_6001217
 
static string cacheAutoLOC_6001218
 
static string cacheAutoLOC_6001219
 
static string cacheAutoLOC_6001220
 
static string cacheAutoLOC_6001221
 
static string cacheAutoLOC_6001222
 
static string cacheAutoLOC_6001223
 
static string cacheAutoLOC_6001224
 
static string cacheAutoLOC_6001225
 
static string cacheAutoLOC_6001226
 
static string cacheAutoLOC_6004038
 
static string cacheAutoLOC_6006095
 

Properties

bool IsCurrentPartFlag [get]
 Returns true if the current held part is a Flag, returns false if there is no current part flag or if it's not a Flag. More...
 

Detailed Description

Base class for Editor Logic

Member Function Documentation

void EditorLogicBase.AssignAttachIcon ( Part  part,
AttachNode  node,
bool  stackNodes,
bool  srfNodes,
bool  dockNodes 
)
inlineprotected

< Added for Unity 4 Support CJ

static void EditorLogicBase.clearAttachNodes ( Part  part,
Part  otherPart 
)
inlinestaticprotected
void EditorLogicBase.CreateSelectedPartIcon ( )
inlineprotected

Creates a part icon for the current selected part when it's not null and it's a cargo part.

void EditorLogicBase.displayAttachNodeIcons ( List< Part parts,
Part  selectedPart,
bool  stackNodes,
bool  srfNodes,
bool  dockNodes 
)
inlineprotected

Displays all attachNodes currently available for attaching. (depending on rules) (false, false disables the node icons)

Parameters
stackNodesshow stack points (if true) or destroy the ones visible (if false)
srfNodesshow surface attach points (if true) or destroy the ones visible (if false)
static List<Part> EditorLogicBase.FindPartsInChildren ( Part  part)
inlinestatic

Finds all parts in the child hierarchy of the given part, part included

Parameters
part
Returns
static void EditorLogicBase.FindPartsInChildren ( ref List< Part parts,
Part  part 
)
inlinestatic

Finds all parts in the child hierarchy of the given part, part included

Parameters
part
Returns
float EditorLogicBase.FindPartSurface ( Part  p,
Vector3  origin,
Vector3  direction,
Vector3  fromParent,
RaycastHit  hit,
out Vector3  srfNormal 
)
inlineprotected

Find the surface of the part using its enabled colliders

Parameters
pThe part
originWhere to cast from
directionin which direction the part is pointing
fromParentthe irection to cast
hitthe position of the hit
srfNormalthe direction the part should face when attached
Returns
distance along the line to position the part
float EditorLogicBase.FindPartSurface ( Part  p,
Vector3  origin,
Vector3  direction,
Vector3  fromParent,
RaycastHit  hit,
out Vector3  srfNormal,
int  layerMask 
)
inlineprotected

Find the surface of the part using its enabled colliders

Parameters
pThe part
originWhere to cast from
directionin which direction the part is pointing
fromParentthe irection to cast
hitthe position of the hit
srfNormalthe direction the part should face when attached
layerMaska bit mask of layers to ignore in the test
Returns
distance along the line to position the part
void EditorLogicBase.handleAttachNodeIcons ( Part  part,
bool  stackNodes,
bool  srfNodes,
bool  dockNodes 
)
inlineprotected
void EditorLogicBase.handleChildNodeIcons ( Part  part)
inlineprotected
bool EditorLogicBase.PartInHierarchy ( Part  part,
Part  tgtPart 
)
inlineprotected

Detects whether the given part has the target part in it's child hierarchy. Used to detect and prevent parts connecting to their own childs and creating hierarchy loops.

Parameters
partthe part from which to search
tgtPartthe part to find
Returns
true if the part is found, false if not
void EditorLogicBase.partRotationInputUpdate ( )
inlineprotected
virtual void EditorLogicBase.partRotationResetUpdate ( )
inlineprotectedvirtual

Reimplemented in EditorLogic, and EVAConstructionModeEditor.

Member Data Documentation

GameObject EditorLogicBase.attachNodePrefab
protected
string EditorLogicBase.cacheAutoLOC_125488
staticprotected
string EditorLogicBase.cacheAutoLOC_125583
staticprotected
string EditorLogicBase.cacheAutoLOC_125724
staticprotected
string EditorLogicBase.cacheAutoLOC_125784
staticprotected
string EditorLogicBase.cacheAutoLOC_125798
staticprotected
string EditorLogicBase.cacheAutoLOC_6001217
staticprotected
string EditorLogicBase.cacheAutoLOC_6001218
staticprotected
string EditorLogicBase.cacheAutoLOC_6001219
staticprotected
string EditorLogicBase.cacheAutoLOC_6001220
staticprotected
string EditorLogicBase.cacheAutoLOC_6001221
staticprotected
string EditorLogicBase.cacheAutoLOC_6001222
staticprotected
string EditorLogicBase.cacheAutoLOC_6001223
staticprotected
string EditorLogicBase.cacheAutoLOC_6001224
staticprotected
string EditorLogicBase.cacheAutoLOC_6001225
staticprotected
string EditorLogicBase.cacheAutoLOC_6001226
staticprotected
string EditorLogicBase.cacheAutoLOC_6004038
staticprotected
string EditorLogicBase.cacheAutoLOC_6006095
staticprotected
bool EditorLogicBase.checkInputLocks = true
protected
EditorScreen EditorLogicBase.editorScreen
KerbalFSM EditorLogicBase.fsm = null
protected
ScreenMessage EditorLogicBase.interactMsg
protected
bool EditorLogicBase.isCurrentPartFlag
protected
ScreenMessage EditorLogicBase.modeMsg
protected
bool EditorLogicBase.partTweaked
protected
CompoundPart EditorLogicBase.selectedCompoundPart
protected
Part EditorLogicBase.selectedPart
protected
Vector3 EditorLogicBase.selPartGrabOffset
Quaternion EditorLogicBase.stackRotation
protected

Property Documentation

bool EditorLogicBase.IsCurrentPartFlag
get

Returns true if the current held part is a Flag, returns false if there is no current part flag or if it's not a Flag.


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