Class FZagalaSpecScenarioFilterEvaluator#

Class Documentation#

class FZagalaSpecScenarioFilterEvaluator#

Applies scenario filters to the filter tags of a scenario.

Exclude always wins. Require tags are resolved per filter (“within”) and then across the filters that have a verdict (“across”), with the defaults of any Require tag within a filter and every applicable filter across filters. The defaults can be changed with the ZagalaSpec.ScenarioFilter.Rule tags on the scenario. Filters whose handled tags are not present on the scenario are ignored, so a scenario without filter tags is always included.

Public Static Functions

static bool UsesWithinAll(const FGameplayTagContainer &ScenarioFilterTags)#

Tells whether every Require tag of a filter must be satisfied.

Logs a warning and returns true when both Within rule tags are present (the stricter rule wins).

Parameters:

ScenarioFilterTags – The filter tags of the scenario.

static bool UsesAcrossAny(const FGameplayTagContainer &ScenarioFilterTags)#

Tells whether one applicable filter being satisfied is enough.

Logs a warning and returns false when both Across rule tags are present (the stricter rule wins).

Parameters:

ScenarioFilterTags – The filter tags of the scenario.

static bool CombineWithin(const FGameplayTagContainer &ScenarioFilterTags, const TArray<bool> &RequireResults)#

Combines the results of the Require tags of a single filter using the Within rule.

Parameters:
  • ScenarioFilterTags – The filter tags of the scenario.

  • RequireResults – One result per Require tag of the scenario handled by the filter.

Returns:

True when there are no results or the rule is satisfied.

static bool ShouldInclude(const FGameplayTagContainer &ScenarioFilterTags, const TArray<const UObject*> &Filters, FString &OutReason)#

Evaluates the filters against the filter tags of a scenario.

Parameters:
  • ScenarioFilterTags – The filter tags of the scenario.

  • Filters – Objects implementing IZagalaSpecScenarioFilter. Invalid objects and objects that do not implement it are skipped.

  • OutReason – When the scenario is not included, describes the filter that rejected it.

Returns:

True when the scenario must be listed.