First commit

This commit is contained in:
sbularca
2026-05-19 15:52:04 +02:00
commit 27b7aeee46
1660 changed files with 240354 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
using System;
using UnityEngine;
namespace Jovian.EncounterSystem {
/// <summary>Looks up <see cref="id"/> in the library passed to <see cref="Resolve"/>; falls back to <see cref="inlineText"/>.</summary>
[Serializable]
public struct DialogLineRef {
public string id;
[TextArea(2, 6)] public string inlineText;
public string Resolve(DialogLineLibrary library) {
if(!library || string.IsNullOrEmpty(id)) {
return inlineText;
}
var text = library.Resolve(id);
return !string.IsNullOrEmpty(text) ? text : inlineText;
}
}
}