Skip to content

Commit

Permalink
Changed recovery from panic a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Da-Teach committed Mar 6, 2011
1 parent 24bcb94 commit 95322c4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Questor.Modules/Panic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 95322c4

Please sign in to comment.