Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stock staging in RealChutes #68

Merged
merged 4 commits into from
Jun 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions FerramAerospaceResearch/RealChuteLite/RealChuteFAR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1069,12 +1069,6 @@ private void FixedUpdate()

CalculateSafeToDeployEstimate();

if (!staged &&
GameSettings.LAUNCH_STAGES.GetKeyDown() &&
vessel.isActiveVessel &&
(part.inverseStage == StageManager.CurrentStage - 1 || StageManager.CurrentStage == 0))
ActivateRC();

if (!staged)
return;
//Checks if the parachute must disarm
Expand Down Expand Up @@ -1162,6 +1156,13 @@ private void OnDestroy()
//Hide/show UI event removal
GameEvents.onHideUI.Remove(HideUI);
GameEvents.onShowUI.Remove(ShowUI);
GameEvents.onStageActivate.Remove(OnStageActivate);
}

private void OnStageActivate(int stage)
{
if (!staged && stage == part.inverseStage)
ActivateRC();
}

public override void OnStart(StartState startState)
Expand Down Expand Up @@ -1210,6 +1211,7 @@ public override void OnStart(StartState startState)
//Hide/show UI event addition
GameEvents.onHideUI.Add(HideUI);
GameEvents.onShowUI.Add(ShowUI);
GameEvents.onStageActivate.Add(OnStageActivate);

if (CanRepack)
SetRepack();
Expand Down
Binary file not shown.
Binary file modified GameData/FerramAerospaceResearch/Plugins/ferramGraph.dll
Binary file not shown.
Binary file modified bin/Debug/FerramAerospaceResearch.dll
Binary file not shown.
Binary file modified bin/Debug/ferramGraph.dll
Binary file not shown.