mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
22 lines
756 B
C#
22 lines
756 B
C#
using HarmonyLib;
|
|
|
|
namespace NewHorizons.Patches;
|
|
|
|
[HarmonyPatch]
|
|
internal class CharacterDialogueTreePatches
|
|
{
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(typeof(CharacterDialogueTree), nameof(CharacterDialogueTree.Awake))]
|
|
private static void CharacterDialogueTree_Awake(CharacterDialogueTree __instance)
|
|
{
|
|
GlobalMessenger<OWRigidbody>.AddListener("AttachPlayerToPoint", (_) => __instance.EndConversation());
|
|
}
|
|
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(typeof(CharacterDialogueTree), nameof(CharacterDialogueTree.OnDestroy))]
|
|
private static void CharacterDialogueTree_OnDestroy(CharacterDialogueTree __instance)
|
|
{
|
|
GlobalMessenger<OWRigidbody>.RemoveListener("AttachPlayerToPoint", (_) => __instance.EndConversation());
|
|
}
|
|
}
|