Kerbal Space Program
1.12.4
|
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.
| |||
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< ArrowPointer > | arrowScanPoints = 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< RocCBDefinition > | myCelestialBodies |
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... | |
|
inline |
|
inline |
Returns the closest position of all the ROC scan points to the test position.
testPosition | World space position to compare to the ROC scan points. |
bestDistanceToPoint | This will have the distance to the closest scan point inserted into it. |
|
inline |
Returns the closest position of all the ROC scan points to the test position.
testPosition | World space position to compare to the ROC scan points. |
distanceToPoint | This will have the distance to the closest scan point inserted into it. |
|
inline |
Gets the force scale regarding the vfxCurveForce values.
burstClipTime | Current burst clip time. |
|
inline |
Performs an experiment on the ROC.
moduleScienceExperiment | Must be a reference to the ModuleScienceExperiment that is performing the experiment on the ROC |
|
inline |
With this function we remove the ROC if its already used or pickup
|
inline |
With this function we set the stats of the ROCs according to their cfg
type | The name (type) of ROC |
displayName | The display name of the ROC. |
prefabName | The name of the ROC prefab. |
modelName | The name of the ROC model. |
orientateup | True if the ROC is to be always orientated Up |
depth | The Depth the ROC should be into the terrain. |
canbetaken | True if a Kerbal can pick up this ROC |
frequency | The Frequency this ROC appears per sq km |
myCelestialBodies | Celestial Body subnodes defining where this ROC can be found |
castShadows | If this ROC casts shadows |
recieveShadows | If this ROC receives shadows |
collisionthreshold | ROC Collision resistance |
smallroc | If true then this ROC is small enough that it can be destroyed |
randomdepth | If this ROC has random depth |
randomorientation | If this ROC has random orientation |
localSpaceScanPoints | Points for the scanner arm to try to interact with. |
emitterName | Contains the emitter name prefab, if not null. |
sfxVolume | ROCs' sfx audio source volume (0.0 to 1.0). |
idleClipPath | Idle clip file path. |
burstClipPath | Burst clip file path. |
vfxBaseForce | Defines the burst emitter force base unit. |
vfxCurveForce | The floatCurve to control the vfx applied force. |
applyForces | Defines if the ROC VFX applies forces. |
forceDirection | Direction vector to apply the force in. |
vfxForceRadius | Defines the VFX force collider dimensions. |
radiusCenter | Defines the radius position. |
|
inlineprotectedvirtual |
Updates the model transform if necessary.
|
inlinevirtual |
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.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 |
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.