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

Public Member Functions

void CheckCollision (Vessel vessel)
 With this function we check if the vessel that collisions with this ROC can destroy it. More...
 
Vector3 GetClosestScanPosition (Vector3 testPosition, out float bestDistanceToPoint)
 Returns the closest position of all the ROC scan points to the test position. More...
 
Vector3 GetClosestScanPositionWithRaycasts (Vector3 testPosition, out float distanceToPoint)
 Returns the closest position of all the ROC scan points to the test position. More...
 
float GetVFXForceScale (float burstClipTime)
 Gets the force scale regarding the vfxCurveForce values. More...
 
bool PerformExperiment (ModuleScienceExperiment moduleScienceExperiment)
 Performs an experiment on the ROC.

Parameters
moduleScienceExperimentMust be a reference to the ModuleScienceExperiment that is performing the experiment on the ROC
More...
 
void PickUpROC ()
 With this function we remove the ROC if its already used or pickup More...
 
void SetStats (string type, string displayName, string prefabName, string modelName, bool orientateup, float depth, bool canbetaken, float frequency, List< RocCBDefinition > myCelestialBodies, bool castShadows, bool recieveShadows, float collisionthreshold, bool smallroc, bool randomdepth, bool randomorientation, List< Vector3 > localSpaceScanPoints, float burstEmitterMinWait, float burstEmitterMaxWait, bool randomRotation, float scale, float sfxVolume, string idleClipPath, string burstClipPath, FloatCurve vfxCurveForce, float vfxBaseForce, bool applyForces, Vector2 vfxForceRadius, Vector3 forceDirection, Vector3 radiusCenter)
 With this function we set the stats of the ROCs according to their cfg More...
 
virtual void UpdateRocArrow ()
 

Public Attributes

bool applyForces
 Defines if the ROC VFX applies forces. More...
 
List< ArrowPointerarrowScanPoints = null
 
string burstClipPath
 Burst clip file path. More...
 
float burstEmitterMaxWait = 300
 The ROCs' particle burst emitter max wait time. More...
 
float burstEmitterMinWait = 60
 The ROCs' particle burst emitter min wait time. More...
 
bool canbetaken
 True if a Kerbal can pick up this ROC More...
 
bool castShadows
 If this ROC casts shadows More...
 
float collisionThreshold
 ROC Collision resistance More...
 
float depth
 The Depth the ROC should be into the terrain. More...
 
string displayName
 The display name of the ROC. More...
 
Vector3 forceDirection
 Direction vector to apply the force in. More...
 
float frequency
 The Frequency this ROC appears per sq km More...
 
string idleClipPath
 Idle clip file path. More...
 
List< Vector3 > localSpaceScanPoints = new List<Vector3>()
 List of all the local space points to be used when the robot arm scanner tries to scan the ROC. More...
 
string modelName
 The name of the ROC model More...
 
Transform modelTransform
 The transform of the ROC model More...
 
List< RocCBDefinitionmyCelestialBodies
 The ROCCBDefinitions More...
 
bool orientateup
 True if the ROC is to be always orientated Up More...
 
string prefabName
 The name of the ROC prefab More...
 
Vector3 radiusCenter
 Defines the radius position. More...
 
bool randomDepth
 If this ROC has random depth More...
 
bool randomOrientation
 If this ROC has random orientation More...
 
bool randomRotation
 If this ROC has random rotation More...
 
bool recieveShadows
 If this ROC receives shadows More...
 
ArrowPointer rocArrow = null
 
float rocArrowLength = 60.0f
 
float rocArrowXZScale = 50.0f
 
ROCEmitter rocEmitter
 Reference to the ROCEmitter if there is one More...
 
int rocID = 0
 ROCs ID More...
 
float rocScanpointLength = 2.0f
 
float rocTransformLength = 5.0f
 
float scale = 1f
 Scale of the ROC More...
 
float sfxVolume
 ROCs' sfx audio source volume (0.0 to 1.0) More...
 
bool smallROC
 If this ROC is a small one More...
 
string type
 The name (type) of ROC More...
 
Vector3 upDirection
 Direction pointing off the surface of the celestial body. The ROC can be randomly rotated, so we need to remember this for the debug ROC finder. More...
 
float vfxBaseForce
 Defines the burst emitter force base unit. More...
 
FloatCurve vfxCurveForce
 Sets the preconfigured force scale keys for the burst emitter. More...
 
Vector2 vfxForceRadius
 Defines the VFX force collider dimensions. More...
 

Protected Member Functions

virtual void UpdateModelTransform ()
 Updates the model transform if necessary. More...
 

Member Function Documentation

void ROC.CheckCollision ( Vessel  vessel)
inline

With this function we check if the vessel that collisions with this ROC can destroy it.

Parameters
vesselThe vessel that collisions with this ROC
Vector3 ROC.GetClosestScanPosition ( Vector3  testPosition,
out float  bestDistanceToPoint 
)
inline

Returns the closest position of all the ROC scan points to the test position.

Parameters
testPositionWorld space position to compare to the ROC scan points.
bestDistanceToPointThis will have the distance to the closest scan point inserted into it.
Returns
Closest position of all the ROC scan points to the test position
Vector3 ROC.GetClosestScanPositionWithRaycasts ( Vector3  testPosition,
out float  distanceToPoint 
)
inline

Returns the closest position of all the ROC scan points to the test position.

Parameters
testPositionWorld space position to compare to the ROC scan points.
distanceToPointThis will have the distance to the closest scan point inserted into it.
Returns
Closest position of all the ROC scan points to the test position
float ROC.GetVFXForceScale ( float  burstClipTime)
inline

Gets the force scale regarding the vfxCurveForce values.

Parameters
burstClipTimeCurrent burst clip time.
Returns
bool ROC.PerformExperiment ( ModuleScienceExperiment  moduleScienceExperiment)
inline

Performs an experiment on the ROC.

Parameters
moduleScienceExperimentMust be a reference to the ModuleScienceExperiment that is performing the experiment on the ROC

void ROC.PickUpROC ( )
inline

With this function we remove the ROC if its already used or pickup

void ROC.SetStats ( string  type,
string  displayName,
string  prefabName,
string  modelName,
bool  orientateup,
float  depth,
bool  canbetaken,
float  frequency,
List< RocCBDefinition myCelestialBodies,
bool  castShadows,
bool  recieveShadows,
float  collisionthreshold,
bool  smallroc,
bool  randomdepth,
bool  randomorientation,
List< Vector3 >  localSpaceScanPoints,
float  burstEmitterMinWait,
float  burstEmitterMaxWait,
bool  randomRotation,
float  scale,
float  sfxVolume,
string  idleClipPath,
string  burstClipPath,
FloatCurve  vfxCurveForce,
float  vfxBaseForce,
bool  applyForces,
Vector2  vfxForceRadius,
Vector3  forceDirection,
Vector3  radiusCenter 
)
inline

With this function we set the stats of the ROCs according to their cfg

Parameters
typeThe name (type) of ROC
displayNameThe display name of the ROC.
prefabNameThe name of the ROC prefab.
modelNameThe name of the ROC model.
orientateupTrue if the ROC is to be always orientated Up
depthThe Depth the ROC should be into the terrain.
canbetakenTrue if a Kerbal can pick up this ROC
frequencyThe Frequency this ROC appears per sq km
myCelestialBodiesCelestial Body subnodes defining where this ROC can be found
castShadowsIf this ROC casts shadows
recieveShadowsIf this ROC receives shadows
collisionthresholdROC Collision resistance
smallrocIf true then this ROC is small enough that it can be destroyed
randomdepthIf this ROC has random depth
randomorientationIf this ROC has random orientation
localSpaceScanPointsPoints for the scanner arm to try to interact with.
emitterNameContains the emitter name prefab, if not null.
sfxVolumeROCs' sfx audio source volume (0.0 to 1.0).
idleClipPathIdle clip file path.
burstClipPathBurst clip file path.
vfxBaseForceDefines the burst emitter force base unit.
vfxCurveForceThe floatCurve to control the vfx applied force.
applyForcesDefines if the ROC VFX applies forces.
forceDirectionDirection vector to apply the force in.
vfxForceRadiusDefines the VFX force collider dimensions.
radiusCenterDefines the radius position.
virtual void ROC.UpdateModelTransform ( )
inlineprotectedvirtual

Updates the model transform if necessary.

virtual void ROC.UpdateRocArrow ( )
inlinevirtual

Member Data Documentation

bool ROC.applyForces

Defines if the ROC VFX applies forces.

List<ArrowPointer> ROC.arrowScanPoints = null
string ROC.burstClipPath

Burst clip file path.

float ROC.burstEmitterMaxWait = 300

The ROCs' particle burst emitter max wait time.

if this is <0 the burst never plays

float ROC.burstEmitterMinWait = 60

The ROCs' particle burst emitter min wait time.

if this is <0 the burst never plays

bool ROC.canbetaken

True if a Kerbal can pick up this ROC

bool ROC.castShadows

If this ROC casts shadows

float ROC.collisionThreshold

ROC Collision resistance

float ROC.depth

The Depth the ROC should be into the terrain.

string ROC.displayName

The display name of the ROC.

Vector3 ROC.forceDirection

Direction vector to apply the force in.

float ROC.frequency

The Frequency this ROC appears per sq km

string ROC.idleClipPath

Idle clip file path.

List<Vector3> ROC.localSpaceScanPoints = new List<Vector3>()

List of all the local space points to be used when the robot arm scanner tries to scan the ROC.

string ROC.modelName

The name of the ROC model

Transform ROC.modelTransform

The transform of the ROC model

List<RocCBDefinition> ROC.myCelestialBodies

The ROCCBDefinitions

bool ROC.orientateup

True if the ROC is to be always orientated Up

string ROC.prefabName

The name of the ROC prefab

Vector3 ROC.radiusCenter

Defines the radius position.

bool ROC.randomDepth

If this ROC has random depth

bool ROC.randomOrientation

If this ROC has random orientation

bool ROC.randomRotation

If this ROC has random rotation

bool ROC.recieveShadows

If this ROC receives shadows

ArrowPointer ROC.rocArrow = null
float ROC.rocArrowLength = 60.0f
float ROC.rocArrowXZScale = 50.0f
ROCEmitter ROC.rocEmitter

Reference to the ROCEmitter if there is one

int ROC.rocID = 0

ROCs ID

float ROC.rocScanpointLength = 2.0f
float ROC.rocTransformLength = 5.0f
float ROC.scale = 1f

Scale of the ROC

float ROC.sfxVolume

ROCs' sfx audio source volume (0.0 to 1.0)

bool ROC.smallROC

If this ROC is a small one

string ROC.type

The name (type) of ROC

Vector3 ROC.upDirection

Direction pointing off the surface of the celestial body. The ROC can be randomly rotated, so we need to remember this for the debug ROC finder.

float ROC.vfxBaseForce

Defines the burst emitter force base unit.

FloatCurve ROC.vfxCurveForce

Sets the preconfigured force scale keys for the burst emitter.

Vector2 ROC.vfxForceRadius

Defines the VFX force collider dimensions.


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