Skip to content

Commit

Permalink
Remove old FuelFlowSimulation
Browse files Browse the repository at this point in the history
The new one seems to be stable enough

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
  • Loading branch information
lamont-granquist committed Sep 25, 2023
1 parent da367eb commit f5eda67
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 1,811 deletions.
447 changes: 0 additions & 447 deletions MechJeb2/FuelFlowSimulation.cs

This file was deleted.

962 changes: 0 additions & 962 deletions MechJeb2/FuelNode.cs

This file was deleted.

68 changes: 0 additions & 68 deletions MechJeb2/FuelStats.cs

This file was deleted.

4 changes: 0 additions & 4 deletions MechJeb2/MechJeb2.csproj
Expand Up @@ -56,9 +56,6 @@
<Compile Include="FlyingSim\SimulatedParachute.cs" />
<Compile Include="FlyingSim\SimulatedPart.cs" />
<Compile Include="FlyingSim\SimulatedVessel.cs" />
<Compile Include="FuelFlowSimulation.cs" />
<Compile Include="FuelNode.cs" />
<Compile Include="FuelStats.cs" />
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="GLUtils.cs" />
<Compile Include="GuiUtils.cs" />
Expand Down Expand Up @@ -226,7 +223,6 @@
<Compile Include="MechJebModuleSpaceplaneAutopilot.cs" />
<Compile Include="MechJebModuleSpaceplaneGuidance.cs" />
<Compile Include="MechJebModuleSpinupController.cs" />
<Compile Include="MechJebModuleStageStatsOld.cs" />
<Compile Include="MechJebModuleStagingController.cs" />
<Compile Include="MechJebModuleSuicideTimer.cs" />
<Compile Include="MechJebModuleTargetController.cs" />
Expand Down
2 changes: 0 additions & 2 deletions MechJeb2/MechJebCore.cs
Expand Up @@ -550,8 +550,6 @@ public override void OnInactive()

public override void OnAwake()
{
FuelFlowSimulation.FuelNode.DoReflection();

CachedLocalizer.Bootstrap();

Dispatcher.CreateDispatcher();
Expand Down
55 changes: 0 additions & 55 deletions MechJeb2/MechJebModuleStageStats.cs
Expand Up @@ -17,7 +17,6 @@ public class MechJebModuleStageStats : ComputerModule
public bool LiveSLT = true;
public double AltSLT = 0;
public double Mach = 0;
public bool OldFFS;

private int _vabRebuildTimer = 1;

Expand Down Expand Up @@ -87,13 +86,6 @@ private void GetResults()

private void RunSimulation()
{
if (OldFFS)
{
RunOldFFS();

return;
}

using ProfilerMarker.AutoScope auto = _newRunSimulationProfile.Auto();

CelestialBody simBody = HighLogic.LoadedSceneIsEditor ? EditorBody : Vessel.mainBody;
Expand Down Expand Up @@ -230,52 +222,5 @@ public void RequestUpdate()

TryStartSimulation();
}

private void RunOldFFS()
{
MechJebModuleStageStatsOld oldstats = Core.GetComputerModule<MechJebModuleStageStatsOld>();
oldstats.editorBody = EditorBody;
oldstats.liveSLT = LiveSLT;
oldstats.altSLT = AltSLT;
oldstats.mach = Mach;
oldstats.RequestUpdate(this, true);
AtmoStats.Clear();
VacStats.Clear();
for (int i = 0; i < oldstats.vacStats.Length; i++)
{
FuelFlowSimulation.FuelStats item = oldstats.vacStats[i];
var newItem = new FuelStats
{
StartMass = item.StartMass,
EndMass = item.EndMass,
DeltaTime = item.DeltaTime,
DeltaV = item.DeltaV,
SpoolUpTime = item.SpoolUpTime,
Isp = item.Isp,
StagedMass = item.StagedMass,
Thrust = item.EndThrust,
KSPStage = i
};
VacStats.Add(newItem);
}

for (int i = 0; i < oldstats.atmoStats.Length; i++)
{
FuelFlowSimulation.FuelStats item = oldstats.atmoStats[i];
var newItem = new FuelStats
{
StartMass = item.StartMass,
EndMass = item.EndMass,
DeltaTime = item.DeltaTime,
DeltaV = item.DeltaV,
SpoolUpTime = item.SpoolUpTime,
Isp = item.Isp,
StagedMass = item.StagedMass,
Thrust = item.EndThrust,
KSPStage = i
};
AtmoStats.Add(newItem);
}
}
}
}

0 comments on commit f5eda67

Please sign in to comment.