feat: Add WorldStateFlagAttribute and custom property drawer for enhanced dialogue management

- Implemented WorldStateFlagAttribute to mark string fields as world state flags.
- Created NarrativeNPCEditor for custom inspector to visualize dialogue version activation states.
- Developed WorldStateFlagDrawer to provide dropdown menu for known flags in the inspector.
- Introduced ActorModule for managing DialogueActorSO assets, including viewing, creating, and deleting actors.
- Added DialogueModule for managing DialogueSequenceSO assets with detailed previews and action bars.
- Established QuestModule for managing QuestSO assets, including objectives and branches.
- Implemented QuestManagerPostprocessor to automatically refresh QuestManager's quest list on asset changes.
This commit is contained in:
2026-05-24 00:36:11 +08:00
parent 520f84999b
commit 446fd5dcd0
22 changed files with 1908 additions and 101 deletions

View File

@@ -26,6 +26,9 @@ namespace BaseGames.Dialogue
return version.dialogue;
}
if (_fallbackDialogue == null)
Debug.LogWarning($"[NarrativeNPC] '{name}' 没有版本满足当前条件,且未配置兜底对话 (_fallbackDialogue)。", gameObject);
return _fallbackDialogue;
}
}
@@ -43,9 +46,11 @@ namespace BaseGames.Dialogue
public DialogueSequenceSO dialogue;
[Tooltip("全部满足才激活此版本AND 关系)")]
[WorldStateFlag]
public string[] requiredFlags;
[Tooltip("有任意一个 = 此版本不激活NOT 关系)")]
[WorldStateFlag]
public string[] blockedByFlags;
/// <summary>检查此版本的激活条件AND requiredFlags / NOT blockedByFlags。</summary>