feat: Round 49 narrative systems improvements

QuestManager: extract CheckQuestDepsAndFlags shared method, simplify GetQuestLockInfo/CanAccept/MeetsPrerequisites; add GetQuestsInState+FilterQuests implementations; fix extra brace compile bug; add _pauseTimestamps logging; use actualDelta in ApplyAffinity event.

QuestSO: add depth>32 guard to HasPrerequisiteCycle and HasBranchCycle to prevent editor freeze on deep chains.

EventChainModule: replace FindObjectOfType with ServiceLocator.GetOrDefault in ForceExecute; add self-trigger flag detection (check 6) in ValidateAllChains using reflection.

DialogueVariantPreviewWindow: add matrix analysis section enumerating all 2^N flag combinations (N<=10) with table showing winning variant per combination.

WorldStateRegistry: LoadFromSave null guard on data.World sub-collections (P0 fix).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-05-25 00:17:27 +08:00
parent 6eaa83dc71
commit 3c3ea1ead6
6 changed files with 279 additions and 118 deletions

View File

@@ -119,6 +119,18 @@ namespace BaseGames.Quest
/// 若任务当前可以接取,返回 <see cref="QuestLockInfo.Reason"/> 为 <see cref="QuestLockReason.None"/> 的实例。
/// </summary>
QuestLockInfo GetQuestLockInfo(string questId);
/// <summary>
/// 返回当前处于指定状态的所有任务 ID 快照列表。
/// 适用于任务日志 UI 分组显示、成就系统批量统计等场景。
/// </summary>
System.Collections.Generic.IReadOnlyList<string> GetQuestsInState(QuestStateEnum state);
/// <summary>
/// 对所有已注册任务执行谓词过滤,返回满足条件的任务 ID 快照列表。
/// 适用于自定义筛选(如"活跃且含 NPC 亲密度门槛")等场景。
/// </summary>
System.Collections.Generic.IReadOnlyList<string> FilterQuests(System.Func<string, QuestStateEnum, bool> predicate);
}
/// <summary>