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

Prevent failed engines from re-activating. #170

Merged
merged 2 commits into from Jun 6, 2017

Conversation

Starstrider42
Copy link
Contributor

This commit suppresses the Activate/Deactivate Engine right-click command when an engine experiences a shutdown failure, and restores the GUI when the engine is repaired. I don't understand why ModuleEngines requires me to set the events' guiActive when other modules make do with just active. Fixes #160.

I have only tested this fix on stock KSP, not RO.

This commit suppresses the Activate/Deactivate Engine right-click command
when an engine experiences a shutdown failure, and restores the GUI when
the engine is repaired. Fixes KSP-RO#160.
Changes to IgnitionFail cannot be tested due to KSP-RO#163.
@@ -148,6 +153,9 @@ public override float DoRepair()
EngineHandler engine = engines[i];
{
engine.engine.Shutdown();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwvanderbeck, do you remember what the logic was behind making an ignitor repair shut down the engine? This was added in commit 1781eae.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I recall it wasn't so much causing the engine to fail upon repair, but just shut it down in case it was already running. It is a bit hazy but I seem to recall a situation where you could ignite the engine, get a failure and then if you repaired the failure the engine would immediately jump back into the running state. So this was just to ensure that if it failed to ignite, and then you fixed it, you would have to re-ignite it using up an ignition.

@jwvanderbeck jwvanderbeck merged commit 0cb1ca5 into KSP-RO:dev Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants