public readonly record struct GameplayEventFilterWhich events a subscriber wants: a verb, optionally a subject, a place and a tag query.
Remarks
This is what doc 28 means by "costs nothing when nothing dies". "Kill ten undead in Queensdale" is this struct — a verb range, a scene and a tag query — and matching it is a handful of integer comparisons against an event that was going to be posted anyway. There is no polling and no per-frame work for an objective nobody is progressing.
⚠ An empty verb range matches nothing, and that is the point. A filter is built from a name a designer wrote, and RangeOf answers an empty range for a name the content does not have. The other reading — empty means unfiltered — turns one typo in one objective into an objective that completes on the first thing that happens anywhere. Wanting every verb is EveryVerb, which is a thing a caller has to write down.
Fields and properties (7)
public GameplayTagRange VerbThe verb prefix. EveryVerb for any.
public DefId SubjectThe exact subject, or None for any.
public DefId SceneThe map, or None for anywhere.
public GameplayTagQuery? TagsA query over the subject's tags, or null for any.
public static GameplayTagRange EveryVerbThe verb range that matches any verb at all. Written down, never defaulted to.
public static GameplayEventFilter EverythingThe filter that matches everything. What a logger or a recorder subscribes with.
public bool IsSomeWhether this filter can ever match anything.
Methods (2)
public GameplayEventFilter(GameplayTagRange Verb, DefId Subject = default(DefId), DefId Scene = default(DefId), GameplayTagQuery? Tags = null)Which events a subscriber wants: a verb, optionally a subject, a place and a tag query.
public bool Matches(in GameplayEvent gameplayEvent)Whether an event matches.
Used by (8)
- AchievementCriterionVixen.Gameplay.Collections
- CollectionLibraryVixen.Gameplay.Collections
- CollectionRecordVixen.Gameplay.Collections
- EventBusTestsVixen.Gameplay.Quests.Tests
- GameplayEventBusVixen.Gameplay
- GameplayEventSubscriptionVixen.Gameplay
- ObjectiveTemplateVixen.Gameplay.Quests
- ObjectiveTrackerVixen.Gameplay.Quests