Kerbal Space Program
1.12.4
|
A Data Class used to hold the information about a Manned Science Experiment. More...
Classes | |
class | SeismicPartData |
Internal Class used to store entries in SeismicPartList More... | |
Public Member Functions | |
void | CalcSendSeismicScience (Vessel vessel, Part part, float solarMultiplier) |
Called by DeployedScience Scenario when a Seismic science event occurs. Will calculate Science and send it immediately back to Home CB. Checks first if this experiment is in fact a DeployedScience.SeismicExperimentId match. More... | |
void | CalculateScience (float solarMultiplier) |
Calculate Science from lastUT to current UT and store in DataStore. Do NOT call this method for Seismic Experiments. Use CalcSendSeismicScience instead. More... | |
bool | GatherScienceData (out ScienceData experimentData) |
Creates ScienceData for the stored data in the experiment. More... | |
void | Load (ConfigNode node) |
void | Save (ConfigNode node) |
delegate float | SeismicDataCalc (DeployedScienceExperiment scienceExp, float impactJoules, float impactJoulesMaxValue, List< SeismicPartData > seismicPartData) |
Delegate Method for mods to override the Seismic Data calculation if desired. Use SeismicDataCalcOverrideAdd to add a method instance that will be called to override the stock calculation. The Delegate must receive the specified parameters and return a float which contains the Amount of Science Data generated. More... | |
void | SeismicDataCalcOverrideAdd (SeismicDataCalc method) |
Add a delegate method for mods to override the Seismic Data calculation if desired. More... | |
void | SeismicDataCalcOverrideRemove (SeismicDataCalc method) |
Remove a delegate method for mods to override the Seismic Data calculation if desired. More... | |
bool | SendDataToComms () |
Does not check if it's time to send the data. This should be done by checking TimeToSendStoredData() first. Does not use ModuleDataTransmitter or Electric Charge to send the data. Rather - ensure the Deployed Science Cluster is Powered in order to send the data back to Kerbin. More... | |
bool | TimeToSendStoredData () |
Returns true if the amount of stored science in the experiment is a multiple of 10% of the total amount of science that it can generate. Will always return true if the Experiment is a Seismometer experiment. More... | |
void | UpdateScienceExperiment (ModuleGroundExperiment moduleGroundExperiment) |
Update the Science variables in this data class from the passed in PartModule. Updates reference to the PartModule. ScienceLimit, ScienceValue and ScienceModifierRate. More... | |
void | UpdateScienceLimitExperiment (ModuleGroundExperiment moduleGroundExperiment) |
Update the ScienceLimit in this data class from the passed in PartModule. Updates reference to the PartModule and ScienceLimit only. More... | |
void | UpdateScienceValueExperiment (ModuleGroundExperiment moduleGroundExperiment) |
Update the ScienceValue in this data class from the passed in PartModule. Updates reference to the PartModule and the ScienceValue only. More... | |
Static Public Member Functions | |
static DeployedScienceExperiment | Spawn (ModuleGroundExperiment moduleGroundExperiment, DeployedScienceCluster cluster) |
Spawns a DeployedScienceExperiment GameObject; sets the initial data and returns the DeployedScienceExperiment component. More... | |
static DeployedScienceExperiment | SpawnandLoad (ConfigNode node) |
Spawns a DeployedScienceExperiment GameObject; Loads it from ConfigNode and returns the DeployedScienceExperiment component. More... | |
Public Attributes | |
DeployedScienceCluster | Cluster |
Reference to the DeployedScienceCluster data instance that this is a part of. More... | |
FloatCurve | distanceCurve |
Floatcurve used to evaluate the distance multiplier for Seismic Experiment. More... | |
ScienceExperiment | Experiment |
The Science Experiment. More... | |
Vessel | ExperimentVessel |
A link to the Vessel the experiment is a part of. More... | |
double | LastScienceGeneratedUT |
The UT when Science was last generated for this Cluster More... | |
DeployedSciencePart | sciencePart |
The DeployedSciencePart module that this ScienceExperiment is a part of. More... | |
List< SeismicPartData > | seismicPartList |
A list of SeismicPartData that is generated when Parts impact the surface of a CB that this Experiment is deployed on. The list will be processed and cleared automatically by this instance 3 seconds after the first impact is recorded. More... | |
float | xmitDataScalar = 1f |
The Data Scalar used for transmitting the data back to Home CB. For deployed science the default is 1f. More... | |
Properties | |
string | ExperimentId [get] |
This is the Science System Experiment Id defined in EXPERIMENT_DEFINITION cfg node. More... | |
string | ExperimentName [get] |
The Class/Name of the Experiment. More... | |
bool | ExperimentSituationValid [get] |
Is set to true or false if the Experiment Situation is currently valid or not. More... | |
ModuleGroundExperiment | GroundExperimentModule [get] |
Will return reference to the related ModuleGroundExperiment PartModule instance - if it's loaded. Otherwise will return null. More... | |
uint | PartId [get] |
Part PersistentId More... | |
float | ScienceDiminishingModifierRate [get, set] |
The Science modifier applied for diminishing returns. Where there is more than one of this type of experiment on the same CelestialBody. More... | |
float | ScienceLimit [get] |
The Maximum amount of Science this Experiment can generate More... | |
float | ScienceModifierRate [get] |
The Science modifier (percentage) at which science is generated. This percentage is set based on the traits and level of the kerbal that placed it. More... | |
float | ScienceValue [get] |
The Amount of Science this experiment generates More... | |
bool | SeismicEventDataSendPending [get] |
This will be true when a Seismic Event is in progress and the data in SiesmicPartList has not been processed yet. More... | |
float | StoredScienceData [get] |
The Amount of Science data generated but not transmitted More... | |
float | TotalScienceGenerated [get] |
The Total Science Generated by this Experiment More... | |
float | TransmittedScienceData [get] |
The Amount of Science data transmitted More... | |
A Data Class used to hold the information about a Manned Science Experiment.
|
inline |
Called by DeployedScience Scenario when a Seismic science event occurs. Will calculate Science and send it immediately back to Home CB. Checks first if this experiment is in fact a DeployedScience.SeismicExperimentId match.
vessel | Reference to the Vessel |
part | |
solarMultiplier | This is a percentage multiplier applied to the science to allow for Solar Panel generation only providing Power for half the total time (dark-side) |
|
inline |
Calculate Science from lastUT to current UT and store in DataStore. Do NOT call this method for Seismic Experiments. Use CalcSendSeismicScience instead.
solarMultiplier | This is a percentage multiplier applied to the science to allow for Solar Panel generation only providing Power for half the total time (dark-side) |
|
inline |
Creates ScienceData for the stored data in the experiment.
experimentData | ScienceData experimentData with any stored experiment science. |
|
inline |
Implements IConfigNode.
|
inline |
Implements IConfigNode.
delegate float Expansions.Serenity.DeployedScience.Runtime.DeployedScienceExperiment.SeismicDataCalc | ( | DeployedScienceExperiment | scienceExp, |
float | impactJoules, | ||
float | impactJoulesMaxValue, | ||
List< SeismicPartData > | seismicPartData | ||
) |
Delegate Method for mods to override the Seismic Data calculation if desired. Use SeismicDataCalcOverrideAdd to add a method instance that will be called to override the stock calculation. The Delegate must receive the specified parameters and return a float which contains the Amount of Science Data generated.
scienceExp | The DeployedScienceExperiment instance |
impactJoules | The calculated impact in Joules |
impactJoulesMaxValue | The maximum amount of Joules that will produce 100% science for the experiment |
seismicPartData | A list of the Seismic Part Data for all the parts that slammed into the ground that should be considered in the Data Calculations |
|
inline |
Add a delegate method for mods to override the Seismic Data calculation if desired.
method |
|
inline |
Remove a delegate method for mods to override the Seismic Data calculation if desired.
method |
|
inline |
Does not check if it's time to send the data. This should be done by checking TimeToSendStoredData() first. Does not use ModuleDataTransmitter or Electric Charge to send the data. Rather - ensure the Deployed Science Cluster is Powered in order to send the data back to Kerbin.
|
inlinestatic |
Spawns a DeployedScienceExperiment GameObject; sets the initial data and returns the DeployedScienceExperiment component.
|
inlinestatic |
Spawns a DeployedScienceExperiment GameObject; Loads it from ConfigNode and returns the DeployedScienceExperiment component.
|
inline |
Returns true if the amount of stored science in the experiment is a multiple of 10% of the total amount of science that it can generate. Will always return true if the Experiment is a Seismometer experiment.
|
inline |
Update the Science variables in this data class from the passed in PartModule. Updates reference to the PartModule. ScienceLimit, ScienceValue and ScienceModifierRate.
moduleGroundExperiment | The PartModule reference |
|
inline |
Update the ScienceLimit in this data class from the passed in PartModule. Updates reference to the PartModule and ScienceLimit only.
moduleGroundExperiment |
|
inline |
Update the ScienceValue in this data class from the passed in PartModule. Updates reference to the PartModule and the ScienceValue only.
moduleGroundExperiment |
DeployedScienceCluster Expansions.Serenity.DeployedScience.Runtime.DeployedScienceExperiment.Cluster |
Reference to the DeployedScienceCluster data instance that this is a part of.
FloatCurve Expansions.Serenity.DeployedScience.Runtime.DeployedScienceExperiment.distanceCurve |
Floatcurve used to evaluate the distance multiplier for Seismic Experiment.
ScienceExperiment Expansions.Serenity.DeployedScience.Runtime.DeployedScienceExperiment.Experiment |
The Science Experiment.
Vessel Expansions.Serenity.DeployedScience.Runtime.DeployedScienceExperiment.ExperimentVessel |
A link to the Vessel the experiment is a part of.
double Expansions.Serenity.DeployedScience.Runtime.DeployedScienceExperiment.LastScienceGeneratedUT |
The UT when Science was last generated for this Cluster
DeployedSciencePart Expansions.Serenity.DeployedScience.Runtime.DeployedScienceExperiment.sciencePart |
The DeployedSciencePart module that this ScienceExperiment is a part of.
List<SeismicPartData> Expansions.Serenity.DeployedScience.Runtime.DeployedScienceExperiment.seismicPartList |
A list of SeismicPartData that is generated when Parts impact the surface of a CB that this Experiment is deployed on. The list will be processed and cleared automatically by this instance 3 seconds after the first impact is recorded.
float Expansions.Serenity.DeployedScience.Runtime.DeployedScienceExperiment.xmitDataScalar = 1f |
The Data Scalar used for transmitting the data back to Home CB. For deployed science the default is 1f.
|
get |
This is the Science System Experiment Id defined in EXPERIMENT_DEFINITION cfg node.
|
get |
The Class/Name of the Experiment.
|
get |
Is set to true or false if the Experiment Situation is currently valid or not.
|
get |
Will return reference to the related ModuleGroundExperiment PartModule instance - if it's loaded. Otherwise will return null.
|
get |
Part PersistentId
|
getset |
The Science modifier applied for diminishing returns. Where there is more than one of this type of experiment on the same CelestialBody.
|
get |
The Maximum amount of Science this Experiment can generate
|
get |
The Science modifier (percentage) at which science is generated. This percentage is set based on the traits and level of the kerbal that placed it.
|
get |
The Amount of Science this experiment generates
|
get |
This will be true when a Seismic Event is in progress and the data in SiesmicPartList has not been processed yet.
|
get |
The Amount of Science data generated but not transmitted
|
get |
The Total Science Generated by this Experiment
|
get |
The Amount of Science data transmitted