Call as
Functions.presentation.predicate(operator, primary)
Record it as a dependency named Functions.presentation.predicate (accepting the completion does this), then call it by that name.
What it does
Create a typed comparison predicate for a named condition phrase. Positive wording uses the original captured operator map and negative wording uses the current negated operator map. A primary predicate takes precedence over qualifiers; only the first eligible predicate negates. Unknown operators use the existing operator placeholder. This formats wording without comparing values or evaluating a condition.
Arguments
| Name | Type | What it does |
|---|---|---|
operator | string | Comparison operator key, such as EQUALS or LESSTHAN. |
primary | boolean | nil | True marks the main comparison to negate; false or nil leaves it eligible only when no primary predicate exists. |
Returns
| 1 | RMConditionPredicate | Transient typed predicate used as a named phrase value; do not persist it as condition data. |
|---|
Editions
Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.
It reads no game API directly.
How the addon calls it
- Buff Time Remaining (print)
comparison = AuraSummary.predicate(value.operator), - Buff Stacks (print)
comparison = AuraSummary.predicate(value.operator, true), - Have Item In Bags (print)
comparison = Summary.predicate(value.operator, true), - Debuff Time Remaining (print)
comparison = AuraSummary.predicate(value.operator), - Debuff Stacks (print)
comparison = AuraSummary.predicate(value.operator, true), - Extended Character Stat (print)
comparison = ECSLabels.predicate(value.operator, true), - Extended Character Stat Percentage (print)
comparison = ECSLabels.predicate(value.operator, true), - Item Cooldown (print)
comparison = Summary.predicate(value.operator, true),
and 9 more: Health Within Range (print), Health Percentage Within Range (print), Health Percentage Count Within Range (print), Health Count Within Range (print), Mana Within Range (print), Mana Percentage Within Range (print), Mana Percentage Count Within Range (print), Mana Count Within Range (print), Item Set Pieces Equipped (print)
Dependencies
operators(builtin:Functions/presentation.lua:operators)
Source
Functions/presentation.lua, line 94. Read only in game; Duplicate makes an editable copy.
Functions.presentation.predicate(operator, primary)
local positive=addon.nullable(operators[operator], L["<operator>"])
return addon:CreateConditionSummaryPredicate(positive, (addon.negatedOperators or {})[operator], primary)