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:
@@ -98,13 +98,14 @@ namespace BaseGames.World
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回指定分类中所有已标记的 ID(快照副本)。
|
||||
/// 返回指定分类中所有已标记的 ID(只读视图,非副本)。
|
||||
/// 由 WorldStateRegistrySaver.OnSave 调用,将运行时状态写入 SaveData。
|
||||
/// 注意:不保证跨帧稳定性,调用方若需持久快照请自行 ToArray()。
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<string> GetAllIds(WorldObjectCategory category)
|
||||
{
|
||||
if (_states.TryGetValue(category, out var set))
|
||||
return new HashSet<string>(set);
|
||||
return set;
|
||||
return System.Array.Empty<string>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user