Skip to content

Prevent failed engines from re-activating.#170

Merged
jwvanderbeck merged 2 commits intoKSP-RO:devfrom
Starstrider42:Bug_160
Jun 6, 2017
Merged

Prevent failed engines from re-activating.#170
jwvanderbeck merged 2 commits intoKSP-RO:devfrom
Starstrider42:Bug_160

Conversation

@Starstrider42
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants