From 95322c428c7c52b130c6cc1a4777992382b8c817 Mon Sep 17 00:00:00 2001 From: Da-Teach Date: Sun, 6 Mar 2011 11:02:19 +0100 Subject: [PATCH] Changed recovery from panic a bit. --- Questor.Modules/Panic.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Questor.Modules/Panic.cs b/Questor.Modules/Panic.cs index a5687d8e8..47edb9b24 100644 --- a/Questor.Modules/Panic.cs +++ b/Questor.Modules/Panic.cs @@ -133,9 +133,13 @@ public void ProcessState() Logging.Log("Panic: We're in a station, resume mission"); State = PanicState.Resume; } - else if (Cache.Instance.DirectEve.ActiveShip.CapacitorPercentage > Settings.Instance.SafeCapacitorPct) + + var isSafe = Cache.Instance.DirectEve.ActiveShip.CapacitorPercentage > Settings.Instance.SafeCapacitorPct; + isSafe &= Cache.Instance.DirectEve.ActiveShip.ShieldPercentage > Settings.Instance.MinimumShieldPct; + isSafe &= Cache.Instance.DirectEve.ActiveShip.ArmorPercentage > Settings.Instance.MinimumArmorPct; + if (isSafe) { - Logging.Log("Panic: We've recovered our capacitor, resume mission"); + Logging.Log("Panic: We've recovered, resume mission"); State = PanicState.Resume; } break;