This commit is contained in:
SoulliesOfficial
2025-07-26 04:20:25 -04:00
parent bae0bfbc20
commit abf81ece7b
196 changed files with 3909 additions and 964 deletions

View File

@@ -41,8 +41,9 @@ namespace Ichni.Story
public void SetDialog(string dialogName)
{
string chapter = ChapterSelectionManager.instance.currentChapter.chapterName;
string chapter = ChapterSelectionManager.instance.currentChapter.chapterIndex;
TextAsset dialog = Resources.Load<TextAsset>("Story/" + chapter + "/Dialogs/" + dialogName);
dialogUIPage.dialogContentFrame.ClearAllSentences();
SetDialog(new List<TextAsset> { dialog });
}
@@ -53,12 +54,10 @@ namespace Ichni.Story
isPlayingDialog = true;
currentDialog = "NULL";
LoadDialog(dialogFiles, out string firstHeader);
Debug.Log($"Loaded dialog, first header: {firstHeader}");
currentDialog = dialogParagraphName == "" ? firstHeader : dialogParagraphName;
Debug.Log($"Setting dialog to: {currentDialog}");
}
public void PlayNextDialogParagraph(string nextDialog, bool invokeFunctions = true)
@@ -138,6 +137,9 @@ namespace Ichni.Story
{
StoryManager.instance.storyline.currentBlock.state = StoryBlockState.Completed;
isPlayingDialog = false;
dialogUIPage.FadeOut();
Debug.Log("Dialog completed, setting block state to Completed.");
StoryManager.instance.storyline.SaveStoryline(ChapterSelectionManager.instance.currentChapter.chapterIndex);
}
}
@@ -145,7 +147,7 @@ namespace Ichni.Story
{
string finalType;
int max = 0;
Debug.Log($"Revealing dialog: {currentDialog}, currentFinalType: {currentFinalType}");
do
{
finalType = currentFinalType;