csharp
public readonly record struct RequirementOne requirement with its names resolved: the form both ends evaluate.
Remarks
The same struct on the client and on the realm, and that is the whole point of the type. Doc 28 § Requirements: evaluated on the client for the UI and on the realm for the truth, out of one assembly, which is what makes a greyed-out button and a rejected request agree. Two implementations of "can I do this" is how a player learns to spam a button that says no.
Fields and properties (6)
public RequirementKind KindWhat it asks about.
public AttributeId SubjectWhich value, for Value.
public GameplayTagRange RangeWhich tag prefix, for the tag kinds.
public RequirementComparison ComparisonHow the number compares.
public float ValueWhat it compares against.
public const float ToleranceHow close two floats have to be to count as equal.
Methods (3)
public Requirement(RequirementKind Kind, AttributeId Subject, GameplayTagRange Range, RequirementComparison Comparison, float Value)One requirement with its names resolved: the form both ends evaluate.
public static Requirement Compile(RequirementDefinition definition, GameplayTagTable tags)Resolves an authored requirement.
public bool IsMetBy(IRequirementContext context)Whether a subject satisfies it.
Used by (3)
- CollectionLibraryVixen.Gameplay.Collections
- RequirementSetVixen.Gameplay
- RequirementTestsVixen.Gameplay.Tests