mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
25 lines
761 B
C#
25 lines
761 B
C#
using HarmonyLib;
|
|
|
|
namespace NewHorizons.Patches.DialoguePatches
|
|
{
|
|
[HarmonyPatch(typeof(HearthianRecorderEffects))]
|
|
public static class HearthianRecorderEffectsPatches
|
|
{
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(nameof(HearthianRecorderEffects.Awake))]
|
|
public static bool HearthianRecorderEffects_Awake(HearthianRecorderEffects __instance)
|
|
{
|
|
// If we're adding custom dialogue to a recorder the CharacterDialogueTree isn't going to be on the object
|
|
if (__instance.GetComponent<CharacterDialogueTree>() == null)
|
|
{
|
|
__instance.enabled = false;
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|