diff --git a/NewHorizons/Builder/Props/DialogueBuilder.cs b/NewHorizons/Builder/Props/DialogueBuilder.cs
index fc958d9c..b4d77f10 100644
--- a/NewHorizons/Builder/Props/DialogueBuilder.cs
+++ b/NewHorizons/Builder/Props/DialogueBuilder.cs
@@ -80,8 +80,10 @@ namespace NewHorizons.Builder.Props
priority = 1,
dialogue = dialogue,
prereqConditionType = RemoteDialogueTrigger.MultiConditionType.AND,
- prereqConditions = info.remoteTriggerPrereqConditions ?? new string[]{ },
- onTriggerEnterConditions = info.remoteTriggerOnEnterConditions ?? new string[]{ }
+ // Base game never uses more than one condition anyone so we'll keep it simple
+ prereqConditions = string.IsNullOrEmpty(info.remoteTriggerPrereqCondition) ? new string[]{ } : new string[] { info.remoteTriggerPrereqCondition },
+ // Just set your enter conditions in XML instead of complicating it with this
+ onTriggerEnterConditions = new string[]{ }
}
};
remoteDialogueTrigger._activatedDialogues = new bool[1];
diff --git a/NewHorizons/External/Modules/PropModule.cs b/NewHorizons/External/Modules/PropModule.cs
index 17d1846e..683244c8 100644
--- a/NewHorizons/External/Modules/PropModule.cs
+++ b/NewHorizons/External/Modules/PropModule.cs
@@ -509,14 +509,9 @@ namespace NewHorizons.External.Modules
public float remoteTriggerRadius;
///
- /// If setting up a remote trigger volume, these conditions must be met for it to trigger
+ /// If setting up a remote trigger volume, this conditions must be met for it to trigger. Note: This is a dialogue condition, not a persistent condition.
///
- public string[] remoteTriggerPrereqConditions;
-
- ///
- /// If setting up a remote trigger volume, but I have no idea what this does at all
- ///
- public string[] remoteTriggerOnEnterConditions;
+ public string remoteTriggerPrereqCondition;
///
/// Relative path to the xml file defining the dialogue.
diff --git a/NewHorizons/Patches/RemoteDialogueTriggerPatches.cs b/NewHorizons/Patches/RemoteDialogueTriggerPatches.cs
index fb7acb9f..18ac648c 100644
--- a/NewHorizons/Patches/RemoteDialogueTriggerPatches.cs
+++ b/NewHorizons/Patches/RemoteDialogueTriggerPatches.cs
@@ -14,18 +14,25 @@ namespace NewHorizons.Patches
[HarmonyPatch(typeof(HUDMarker), nameof(HUDMarker.Awake))]
public static void OnTriggerEnter(RemoteDialogueTrigger __instance)
{
- _wasLastDialogueInactive = __instance._activeRemoteDialogue.gameObject.activeInHierarchy;
- __instance._activeRemoteDialogue.gameObject.SetActive(true);
+ if (__instance._inRemoteDialogue && __instance._activeRemoteDialogue != null)
+ {
+ _wasLastDialogueInactive = __instance._activeRemoteDialogue.gameObject.activeInHierarchy;
+ __instance._activeRemoteDialogue.gameObject.SetActive(true);
+ }
}
[HarmonyPrefix]
[HarmonyPatch(typeof(HUDMarker), nameof(HUDMarker.Awake))]
public static void OnEndConversation(RemoteDialogueTrigger __instance)
{
- if (_wasLastDialogueInactive)
+ if (__instance._inRemoteDialogue && __instance._activeRemoteDialogue != null)
{
- __instance._activeRemoteDialogue.gameObject.SetActive(false);
+ if (_wasLastDialogueInactive)
+ {
+ __instance._activeRemoteDialogue.gameObject.SetActive(false);
+ }
}
+
_wasLastDialogueInactive = false;
}
}