feat: Round 50 narrative systems improvements
IQuestManager+QuestManager: add FillQuestsInState/FillFilterQuests buffer overloads (no-alloc hot path); remove R49 duplicate implementations. QuestGiver: cache current quest result (_cachedQuest/_cachedState/_cacheDirty) to avoid per-frame foreach in InteractPrompt; invalidate on OnEnable and Interact_Internal state changes. IDialogueService+DialogueManager: add StartDialogue(..., Action onComplete) overload; callback fires once on ForceEnd (covers both normal end and interrupt); supports chained callbacks via += accumulation. DialogueVariantPreviewWindow: add 'Copy CSV' button in matrix section; exports all 2^N flag combinations with winner column; handles N>10 guard and CSV-safe escaping. WorldStateRegistry: add TryGetCategory(id, out category) reverse lookup for debug tools. NpcSOEditor: new CustomEditor for NpcSO showing live nameKey localization preview in Inspector (green label or warning box if Key not found). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -131,6 +131,18 @@ namespace BaseGames.Quest
|
||||
/// 适用于自定义筛选(如"活跃且含 NPC 亲密度门槛")等场景。
|
||||
/// </summary>
|
||||
System.Collections.Generic.IReadOnlyList<string> FilterQuests(System.Func<string, QuestStateEnum, bool> predicate);
|
||||
|
||||
/// <summary>
|
||||
/// 将当前处于指定状态的所有任务 ID 填入调用方提供的列表(先 Clear 再添加)。
|
||||
/// 相比 <see cref="GetQuestsInState"/> 不分配新列表,适合高频调用(如每帧刷新 HUD)。
|
||||
/// </summary>
|
||||
void FillQuestsInState(QuestStateEnum state, System.Collections.Generic.List<string> result);
|
||||
|
||||
/// <summary>
|
||||
/// 将满足谓词的所有任务 ID 填入调用方提供的列表(先 Clear 再添加)。
|
||||
/// 相比 <see cref="FilterQuests"/> 不分配新列表,适合高频调用场景。
|
||||
/// </summary>
|
||||
void FillFilterQuests(System.Func<string, QuestStateEnum, bool> predicate, System.Collections.Generic.List<string> result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user