Skip to content

Commit

Permalink
Merge pull request #68 from dkavolis/staging
Browse files Browse the repository at this point in the history
Use stock staging in RealChutes
  • Loading branch information
dkavolis authored Jun 20, 2019
2 parents a8c09ae + 12e1534 commit 0363091
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
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.

0 comments on commit 0363091

Please sign in to comment.