mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Earn probe lost achievement with destruction volumes too
+ only set entered eye condition when at the eye
This commit is contained in:
parent
968ef6a1e3
commit
16131fa6f4
@ -1,6 +1,7 @@
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using NewHorizons.OtherMods.AchievementsPlus.NH;
|
using NewHorizons.OtherMods.AchievementsPlus.NH;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace NewHorizons.Patches
|
namespace NewHorizons.Patches
|
||||||
{
|
{
|
||||||
@ -16,5 +17,26 @@ namespace NewHorizons.Patches
|
|||||||
SuckedIntoLavaByTornadoAchievement.Earn();
|
SuckedIntoLavaByTornadoAchievement.Earn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(ProbeDestructionDetector), nameof(ProbeDestructionDetector.FixedUpdate))]
|
||||||
|
public static bool ProbeDestructionDetector_FixedUpdate(ProbeDestructionDetector __instance)
|
||||||
|
{
|
||||||
|
if (__instance._activeVolumes.Count > 0 && __instance._safetyVolumes.Count == 0)
|
||||||
|
{
|
||||||
|
if (LoadManager.GetCurrentScene() == OWScene.EyeOfTheUniverse)
|
||||||
|
{
|
||||||
|
DialogueConditionManager.SharedInstance.SetConditionState("PROBE_ENTERED_EYE", conditionState: true);
|
||||||
|
Debug.Log("PROBE DESTROYED (ENTERED THE EYE)");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Debug.Log("PROBE DESTROYED");
|
||||||
|
|
||||||
|
ProbeLostAchievement.Earn();
|
||||||
|
Object.Destroy(__instance._probe.gameObject);
|
||||||
|
}
|
||||||
|
__instance.enabled = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user