Table of Contents

Struct TagSet

Namespace
Vintagestory.API.Datastructures
Assembly
VintagestoryAPI.dll
[JsonConverter(typeof(CollectibleTagSetConverter))]
public readonly struct TagSet : IEquatable<TagSet>
Implements
Inherited Members
Extension Methods

Constructors

TagSet()

public TagSet()

Fields

Empty

public static readonly TagSet Empty

Field Value

TagSet

Properties

IsEmpty

public bool IsEmpty { get; }

Property Value

bool

Methods

Equals(object?)

A true equality test: are these exactly the same TagSet (e.g. when searching for duplicate grid recipe ingredients using the same tags)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(TagSet)

A true equality test: are these exactly the same TagSet (e.g. when searching for duplicate grid recipe ingredients using the same tags)

public bool Equals(TagSet other)

Parameters

other TagSet

Returns

bool

FromBytes(BinaryReader)

public static TagSet FromBytes(BinaryReader reader)

Parameters

reader BinaryReader

Returns

TagSet

GetHashCode()

public override int GetHashCode()

Returns

int

IsFullyContainedIn(in TagSet)

public bool IsFullyContainedIn(in TagSet other)

Parameters

other TagSet

Returns

bool

True if all tags that are active in this instance are also active in the other instance, false otherwise.

Remarks

This is NOT symmetrical, meaning a.IsFullyContainedIn(b) != b.IsFullyContainedIn(a) !

Overlaps(in TagSet)

public bool Overlaps(in TagSet other)

Parameters

other TagSet

Returns

bool

True if all any of the tags that are active in this instance are also active in the other instance, false otherwise.

Remarks

This is symmetrical, meaning a.Overlaps(b) == b.Overlaps(a) .

ToBytes(BinaryWriter)

public void ToBytes(BinaryWriter writer)

Parameters

writer BinaryWriter

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(in TagSet, in TagSet)

public static bool operator ==(in TagSet self, in TagSet other)

Parameters

self TagSet
other TagSet

Returns

bool

operator !=(in TagSet, in TagSet)

public static bool operator !=(in TagSet self, in TagSet other)

Parameters

self TagSet
other TagSet

Returns

bool