Skip to content

Commit

Permalink
add commented-out logging code for hint system debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ixrec committed Aug 12, 2024
1 parent 47811b7 commit 08468bb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mod/Hints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public static bool TextTranslation_Translate(TextTranslation __instance, string
[HarmonyPrefix, HarmonyPatch(typeof(CharacterDialogueTree), nameof(CharacterDialogueTree.InputDialogueOption))]
public static void CharacterDialogueTree_InputDialogueOption(CharacterDialogueTree __instance, int optionIndex)
{
//APRandomizer.OWMLModConsole.WriteLine($"CharacterDialogueTree_InputDialogueOption passed {optionIndex} at node {__instance._currentNode?.Name}");

string selectedTextId = null;
if (__instance._currentNode.ListDialogueOptions != null && optionIndex >= 0 && optionIndex < __instance._currentNode.ListDialogueOptions.Count())
selectedTextId = __instance._currentNode.ListDialogueOptions[optionIndex]?._textID;
Expand Down Expand Up @@ -187,4 +189,11 @@ public static void CharacterDialogueTree_StartConversation_Postfix(CharacterDial
__instance._mapDialogueNodes[hintNodeName] = hintNode1;
}
}

// useful for testing
/*[HarmonyPrefix, HarmonyPatch(typeof(CharacterDialogueTree), nameof(CharacterDialogueTree.ContinueToNextNode), [])]
public static void CharacterDialogueTree_ContinueToNextNode(CharacterDialogueTree __instance)
{
APRandomizer.OWMLModConsole.WriteLine($"CharacterDialogueTree_ContinueToNextNode moving from {__instance._currentNode.Name} to {__instance._currentNode.Target?.Name}");
}*/
}

0 comments on commit 08468bb

Please sign in to comment.