removed a ton of xml comments and such
This commit is contained in:
@@ -3,30 +3,19 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Jovian.EncounterSystem {
|
||||
/// <summary>One dialog line — an id/text pair in a <see cref="DialogLineLibrary"/>.</summary>
|
||||
[Serializable]
|
||||
public class DialogLine {
|
||||
/// <summary>Stable key referenced by <see cref="DialogLineRef"/> (e.g. "common.farewell").</summary>
|
||||
public string id;
|
||||
|
||||
/// <summary>The actual text shown to the player.</summary>
|
||||
[TextArea(2, 6)]
|
||||
public string text;
|
||||
[TextArea(2, 6)] public string text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Single-asset registry of reusable dialog lines. One library file holds many lines; dialog
|
||||
/// options reference them by id via <see cref="DialogLineRef"/>. Split into multiple libraries
|
||||
/// (e.g. CommonLines, TownDialogue) only when a single file becomes unwieldy.
|
||||
/// </summary>
|
||||
/// <summary>Flat registry of reusable dialog lines. Referenced via <see cref="DialogLineRef"/>.</summary>
|
||||
[CreateAssetMenu(fileName = "DialogLineLibrary", menuName = "Jovian/Encounter System/Dialog Line Library", order = 4)]
|
||||
public class DialogLineLibrary : ScriptableObject {
|
||||
/// <summary>All lines in the library.</summary>
|
||||
public List<DialogLine> lines = new();
|
||||
|
||||
private Dictionary<string, string> cache;
|
||||
|
||||
/// <summary>Return the text for <paramref name="id"/>, or <c>null</c> if not found.</summary>
|
||||
public string Resolve(string id) {
|
||||
if(string.IsNullOrEmpty(id)) {
|
||||
return null;
|
||||
@@ -36,8 +25,6 @@ namespace Jovian.EncounterSystem {
|
||||
return cache.TryGetValue(id, out var text) ? text : null;
|
||||
}
|
||||
|
||||
/// <summary>Force the next <see cref="Resolve"/> call to rebuild the id → text cache.
|
||||
/// Called automatically from <c>OnValidate</c> after inspector edits.</summary>
|
||||
public void InvalidateCache() {
|
||||
cache = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user