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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user