Linking the octo localization system to the dialogue system

This commit is contained in:
2026-02-17 19:06:37 +01:00
parent 79da2e5722
commit ec89813b1b
62 changed files with 832 additions and 120 deletions
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using UnityEngine;
using OctoCore.Localization;
namespace Unheimlich.Data.Dialogues
{
@@ -7,13 +8,8 @@ namespace Unheimlich.Data.Dialogues
public class DialogueNode : ScriptableObject
{
[Header("Content")]
[TextArea(3, 10)]
[Tooltip("Text displayed for this dialogue node")]
public string DialogueText;
[Header("Localization")]
[Tooltip("Localization key for the dialogue text")]
public string DialogueTextLocalizationKey;
[Tooltip("Localized text displayed for this dialogue node")]
public OctoLocalizedTextData DialogueText;
[Header("Choices")]
[Tooltip("List of available choices for this dialogue. If empty, this is an end node")]
@@ -22,6 +18,14 @@ namespace Unheimlich.Data.Dialogues
[Header("End Node Settings")]
[Tooltip("For end nodes (no choices), delay in seconds before automatic close. 0 = requires player interaction to close")]
public float AutoCloseDelay = 3f;
public string GetLocalizedDialogueText()
{
if (DialogueText != null)
return OctoLocalization.GetLocalizedText(DialogueText);
return string.Empty;
}
public bool IsEndNode()
{