Skip to content

Commit

Permalink
Some minor fixes to science data and labs
Browse files Browse the repository at this point in the history
  • Loading branch information
DMagic1 committed Apr 19, 2016
1 parent 81b5e53 commit 4581dbc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Source/DMSeismicHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public static ScienceData makeData(DMSeismometerValues sensor, float score, Scie
sub.title = exp.experimentTitle + string.Format(" from {0}'s {1}", body.theName, biome);
}

return new ScienceData(science, 1f, 1f, sub.id, sub.title, false, sensor.ID);
return new ScienceData(science, 1f, v.VesselValues.ScienceReturn.value, sub.id, sub.title, false, sensor.ID);
}

private static void registerDMScience(DMAsteroidScience newAst, ScienceExperiment exp, ScienceSubject sub)
Expand Down
2 changes: 1 addition & 1 deletion Source/Part Modules/DMAsteroidScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ private ScienceData makeScience(float dist, ModuleAsteroid m)
registerDMScience(ast, sub);
body.bodyName = asteroidBodyNameFixed;

data = new ScienceData(multiplier * exp.baseValue * sub.dataScale, transmitValue, 0f, sub.id, dataTitle, false, part.flightID);
data = new ScienceData(multiplier * exp.baseValue * sub.dataScale, transmitValue, vessel.VesselValues.ScienceReturn.value, sub.id, dataTitle, false, part.flightID);

return data;
}
Expand Down
8 changes: 4 additions & 4 deletions Source/Part Modules/DMModuleScienceAnimate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public void deployAction(KSPActionParam param)
public virtual void retractEvent()
{
if (oneWayAnimation) return;
if (oneShot) return;
if (oneShot && !HighLogic.LoadedSceneIsEditor) return;
primaryAnimator(-1f * animSpeed, 1f, WrapMode.Default, animationName, anim);
IsDeployed = false;
if (USScience)
Expand Down Expand Up @@ -952,7 +952,7 @@ private ScienceData makeScience(float boost, ExperimentSituations vesselSituatio
sub.scienceCap = scienceExp.scienceCap * sub.subjectValue;
}

data = new ScienceData(scienceExp.baseValue * sub.dataScale, xmitDataScalar, 1f, sub.id, sub.title, false, part.flightID);
data = new ScienceData(scienceExp.baseValue * sub.dataScale, xmitDataScalar, vessel.VesselValues.ScienceReturn.value, sub.id, sub.title, false, part.flightID);

return data;
}
Expand Down Expand Up @@ -992,7 +992,7 @@ private void newResultPage()
if (storedScienceReports.Count > 0)
{
ScienceData data = storedScienceReports[dataIndex];
ExperimentResultDialogPage page = new ExperimentResultDialogPage(part, data, data.transmitValue, labDataBoost, (experimentsReturned >= (experimentLimit - 1)) && !rerunnable, transmitWarningText, true, new ScienceLabSearch(vessel, data), new Callback<ScienceData>(onDiscardData), new Callback<ScienceData>(onKeepData), new Callback<ScienceData>(onTransmitData), new Callback<ScienceData>(onSendToLab));
ExperimentResultDialogPage page = new ExperimentResultDialogPage(part, data, data.transmitValue, 0, (experimentsReturned >= (experimentLimit - 1)) && !rerunnable, transmitWarningText, true, new ScienceLabSearch(vessel, data), new Callback<ScienceData>(onDiscardData), new Callback<ScienceData>(onKeepData), new Callback<ScienceData>(onTransmitData), new Callback<ScienceData>(onSendToLab));
ExperimentsResultDialog.DisplayResult(page);
}
}
Expand Down Expand Up @@ -1024,7 +1024,7 @@ private void initialResultsPage()
if (scienceReports.Count > 0)
{
ScienceData data = scienceReports[0];
ExperimentResultDialogPage page = new ExperimentResultDialogPage(part, data, data.transmitValue, labDataBoost, (experimentsReturned >= (experimentLimit - 1)) && !rerunnable, transmitWarningText, true, new ScienceLabSearch(vessel, data), new Callback<ScienceData>(onDiscardInitialData), new Callback<ScienceData>(onKeepInitialData), new Callback<ScienceData>(onTransmitInitialData), new Callback<ScienceData>(onSendInitialToLab));
ExperimentResultDialogPage page = new ExperimentResultDialogPage(part, data, data.transmitValue, 0, (experimentsReturned >= (experimentLimit - 1)) && !rerunnable, transmitWarningText, true, new ScienceLabSearch(vessel, data), new Callback<ScienceData>(onDiscardInitialData), new Callback<ScienceData>(onKeepInitialData), new Callback<ScienceData>(onTransmitInitialData), new Callback<ScienceData>(onSendInitialToLab));
ExperimentsResultDialog.DisplayResult(page);
}
}
Expand Down

0 comments on commit 4581dbc

Please sign in to comment.