Skip to content

Commit

Permalink
Code updated for KSP 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jwvanderbeck committed Apr 28, 2015
1 parent a9a15b4 commit b920e4f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 36 deletions.
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/TestFlightCore.dll
Binary file not shown.
15 changes: 1 addition & 14 deletions TestFlight.userprefs
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,9 @@
<File FileName="TestFlightCore/TestFlightCore/FrameworkExt/MonoBehaviourWindowPlus.cs" Line="1" Column="1" />
<File FileName="TestFlightCore/TestFlightCore/UserSettings.cs" Line="1" Column="1" />
<File FileName="TestFlightCore/TestFlightCore/TestFlightInterface.cs" Line="1" Column="1" />
<File FileName="TestFlightAPI/TestFlightAPI/FlightDataConfig.cs" Line="32" Column="1" />
<File FileName="TestFlightAPI/TestFlightAPI/FlightDataConfig.cs" Line="1" Column="1" />
<File FileName="TestFlightAPI/TestFlightAPI/TestFlightReliability.cs" Line="1" Column="1" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State expanded="True">
<Node name="TestFlight" expanded="True" />
<Node name="TestFlightAPI" expanded="True" />
<Node name="TestFlightCore" expanded="True">
<Node name="References" expanded="True" />
<Node name="FrameworkExt" expanded="True" />
<Node name="TestFlightCore.cs" selected="True" />
</Node>
</State>
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
Expand Down
38 changes: 17 additions & 21 deletions TestFlightAPI/TestFlightAPI/EngineModuleWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,8 @@ public float requestedThrust
{
if (engineType == EngineModuleType.UNKNOWN)
return 0f;

if (engineType == EngineModuleType.ENGINE)
return engine.requestedThrust;
else
return engineFX.requestedThrust;

return 0f;
}
}

Expand All @@ -260,6 +257,19 @@ public float finalThrust
}
}

public bool EngineIgnited
{
get
{
if (engineType == EngineModuleType.ENGINE)
return engine.EngineIgnited;
else if (engineType == EngineModuleType.ENGINEFX)
return engineFX.EngineIgnited;

return false;
}
}

public BaseEventList Events
{
get
Expand All @@ -282,22 +292,8 @@ public EngineIgnitionState IgnitionState
if (engineType == EngineModuleType.UNKNOWN)
return EngineIgnitionState.UNKNOWN;

if (flameout)
{
return EngineIgnitionState.NOT_IGNITED;
}
if (requestedThrust <= 0f)
{
return EngineIgnitionState.NOT_IGNITED;
}
if (!throttleLocked && Events.Contains("Shutdown Engine"))
{
return EngineIgnitionState.NOT_IGNITED;
}
if (finalThrust <= 0f)
{
return EngineIgnitionState.NOT_IGNITED;
}
if (EngineIgnited)
return EngineIgnitionState.IGNITED;

return EngineIgnitionState.IGNITED;
}
Expand Down
2 changes: 1 addition & 1 deletion TestFlightCore/TestFlightCore/TestFlightCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<CustomCommands>
<CustomCommands>
<Command type="AfterBuild" command="cp ${TargetFile} ${TargetDir}/../../../../GameData/TestFlight/Plugins" />
<Command type="AfterBuild" command="cp -r /USers/john/Developer/KSP/0.90/TestFlightDEV/Dev/_DEV/GitHub/TestFlight/GameData /Users/john/Developer/KSP/0.90/TestFlightDEV/Dev/" />
<Command type="AfterBuild" command="cp -r /Users/john/Developer/KSP/1.0/TestFlightDEV/Dev/_DEV/GitHub/TestFlight/GameData /Users/john/Developer/KSP/1.0/TestFlightDEV/Dev/" />
</CustomCommands>
</CustomCommands>
<DebugSymbols>true</DebugSymbols>
Expand Down

0 comments on commit b920e4f

Please sign in to comment.