Skip to content

Commit

Permalink
* **NEW**: Parts no longer can gain data while in the **PRELAUNCH** s…
Browse files Browse the repository at this point in the history
…ituation. This means no more static test firing. The new R&D system should be used instead if you don't want to risk parts on an actual flight.

Misc code cleaup
  • Loading branch information
jwvanderbeck committed Mar 24, 2016
1 parent be96eb1 commit c3940b8
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions FlightDataRecorder_Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public override bool IsPartOperating()
if (!isEnabled)
return false;

if (this.part.vessel.situation == Vessel.Situations.PRELAUNCH)
return false;

return engine.IgnitionState == EngineModuleWrapper.EngineIgnitionState.IGNITED;
}

Expand Down
3 changes: 3 additions & 0 deletions FlightDataRecorder_Resources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public override bool IsRecordingFlightData()
if (!isEnabled)
return false;

if (this.part.vessel.situation == Vessel.Situations.PRELAUNCH)
return false;

List<PartResource> partResources = this.part.Resources.list;
foreach (PartResource resource in partResources)
{
Expand Down
Binary file modified GameData/TestFlight/Plugins/TestFlight.dll
Binary file not shown.
Binary file modified GameData/TestFlight/Plugins/TestFlightAPI.dll
Binary file not shown.
Binary file modified GameData/TestFlight/Plugins/TestFlightContracts.dll
Binary file not shown.
Binary file modified GameData/TestFlight/Plugins/TestFlightCore.dll
Binary file not shown.
3 changes: 3 additions & 0 deletions TestFlightAPI/TestFlightAPI/FlightDataRecorder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ public virtual bool IsRecordingFlightData()
if (!IsPartOperating())
return false;

if (this.part.vessel.situation == Vessel.Situations.PRELAUNCH)
return false;

if (!isEnabled)
return false;

Expand Down
2 changes: 0 additions & 2 deletions TestFlightCore/TestFlightCore/TestFlightKSC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ internal override void DrawWindow(int id)
GUILayout.Label("Here you can manage engineering teams working on your hardware.\nYou can start new research programs from the VAB.");
else
{
// tfScenario.userSettings.currentResearchScrollPosition = GUILayout.BeginScrollView(tfScenario.userSettings.currentResearchScrollPosition);
GUILayout.BeginVertical();
foreach (string partInResearch in partsInResearch)
{
Expand All @@ -223,7 +222,6 @@ internal override void DrawWindow(int id)
GUILayout.EndHorizontal();
}
GUILayout.EndVertical();
// GUILayout.EndScrollView();
}
break;
case 1:
Expand Down

0 comments on commit c3940b8

Please sign in to comment.