This commit is contained in:
Noah Pilarski 2022-12-24 13:22:26 -05:00
parent 81255a5e1e
commit f08e7b264d

View File

@ -14,10 +14,9 @@ namespace NewHorizons.Patches
[HarmonyPatch(typeof(ProbeDestructionDetector), nameof(ProbeDestructionDetector.FixedUpdate))]
public static bool ProbeDestructionDetector_FixedUpdate(ProbeDestructionDetector __instance)
{
if (!AchievementHandler.Enabled) return true;
if (__instance._activeVolumes.Count > 0 && __instance._safetyVolumes.Count == 0)
{
// Mobius does SetConditionState even when you are in solar system because probe never get destroyed anywhere else but the Eye.
if (LoadManager.GetCurrentScene() == OWScene.EyeOfTheUniverse)
{
DialogueConditionManager.SharedInstance.SetConditionState("PROBE_ENTERED_EYE", conditionState: true);
@ -26,7 +25,8 @@ namespace NewHorizons.Patches
else
Debug.Log("PROBE DESTROYED");
ProbeLostAchievement.Earn();
if (AchievementHandler.Enabled) ProbeLostAchievement.Earn();
Object.Destroy(__instance._probe.gameObject);
}
__instance.enabled = false;