Show / Hide Table of Contents

Class TagUtils

Inheritance
System.Object
TagUtils
Namespace: Eco.Gameplay.Items
Assembly: Eco.Gameplay.dll
Syntax
public static class TagUtils : Object

Methods

BlockHasAllTags(Vector3i, Tag[])

Declaration
public static bool BlockHasAllTags(Vector3i worldPos, params Tag[] tags)
Parameters
Type Name Description
Vector3i worldPos
Tag[] tags
Returns
Type Description
System.Boolean

BlockHasAllTags(Vector3i, IEnumerable<Tag>)

Declaration
public static bool BlockHasAllTags(Vector3i worldPos, IEnumerable<Tag> tags)
Parameters
Type Name Description
Vector3i worldPos
System.Collections.Generic.IEnumerable<Tag> tags
Returns
Type Description
System.Boolean

BlockHasAnyTag(Vector3i, Tag[])

Declaration
public static bool BlockHasAnyTag(Vector3i worldPos, params Tag[] tags)
Parameters
Type Name Description
Vector3i worldPos
Tag[] tags
Returns
Type Description
System.Boolean

BlockHasAnyTag(Vector3i, IEnumerable<Tag>)

Declaration
public static bool BlockHasAnyTag(Vector3i worldPos, IEnumerable<Tag> tags)
Parameters
Type Name Description
Vector3i worldPos
System.Collections.Generic.IEnumerable<Tag> tags
Returns
Type Description
System.Boolean

BlockHasNoneTags(Vector3i, Tag[])

Declaration
public static bool BlockHasNoneTags(Vector3i worldPos, params Tag[] tags)
Parameters
Type Name Description
Vector3i worldPos
Tag[] tags
Returns
Type Description
System.Boolean

BlockHasNoneTags(Vector3i, IEnumerable<Tag>)

Declaration
public static bool BlockHasNoneTags(Vector3i worldPos, IEnumerable<Tag> tags)
Parameters
Type Name Description
Vector3i worldPos
System.Collections.Generic.IEnumerable<Tag> tags
Returns
Type Description
System.Boolean

BlockMeetsTagRequirements(Vector3i, IEnumerable<Tag>, IEnumerable<Tag>, IEnumerable<Tag>)

Declaration
public static bool BlockMeetsTagRequirements(Vector3i worldPos, IEnumerable<Tag> hasAny, IEnumerable<Tag> hasAll, IEnumerable<Tag> hasNone)
Parameters
Type Name Description
Vector3i worldPos
System.Collections.Generic.IEnumerable<Tag> hasAny
System.Collections.Generic.IEnumerable<Tag> hasAll
System.Collections.Generic.IEnumerable<Tag> hasNone
Returns
Type Description
System.Boolean

GetBestTag(IEnumerable<Object>)

Collects tags of entries and tries to find the best match that is present in each of them.

Declaration
public static Tag GetBestTag(this IEnumerable<object> entries)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Object> entries
Returns
Type Description
Tag

HasAllTags(Type, Tag[])

Declaration
public static bool HasAllTags(this Type type, params Tag[] tags)
Parameters
Type Name Description
System.Type type
Tag[] tags
Returns
Type Description
System.Boolean

HasAllTags(Type, IEnumerable<Tag>)

Declaration
public static bool HasAllTags(this Type type, IEnumerable<Tag> tags)
Parameters
Type Name Description
System.Type type
System.Collections.Generic.IEnumerable<Tag> tags
Returns
Type Description
System.Boolean

HasAnyTag(Type, Tag[])

Declaration
public static bool HasAnyTag(this Type type, params Tag[] tags)
Parameters
Type Name Description
System.Type type
Tag[] tags
Returns
Type Description
System.Boolean

HasAnyTag(Type, IEnumerable<Tag>)

Declaration
public static bool HasAnyTag(this Type type, IEnumerable<Tag> tags)
Parameters
Type Name Description
System.Type type
System.Collections.Generic.IEnumerable<Tag> tags
Returns
Type Description
System.Boolean

HasNoneTags(Type, Tag[])

Declaration
public static bool HasNoneTags(this Type type, params Tag[] tags)
Parameters
Type Name Description
System.Type type
Tag[] tags
Returns
Type Description
System.Boolean

HasNoneTags(Type, IEnumerable<Tag>)

Declaration
public static bool HasNoneTags(this Type type, IEnumerable<Tag> tags)
Parameters
Type Name Description
System.Type type
System.Collections.Generic.IEnumerable<Tag> tags
Returns
Type Description
System.Boolean

HasTag(Type, Tag)

Declaration
public static bool HasTag(this Type type, Tag tag)
Parameters
Type Name Description
System.Type type
Tag tag
Returns
Type Description
System.Boolean

MeetsTagRequirements(Type, IEnumerable<Tag>, IEnumerable<Tag>, IEnumerable<Tag>)

Checks if given type meets all tag requirements. Pass null to requirement to ignore it.

Declaration
public static bool MeetsTagRequirements(this Type type, IEnumerable<Tag> hasAny, IEnumerable<Tag> hasAll, IEnumerable<Tag> hasNone)
Parameters
Type Name Description
System.Type type
System.Collections.Generic.IEnumerable<Tag> hasAny
System.Collections.Generic.IEnumerable<Tag> hasAll
System.Collections.Generic.IEnumerable<Tag> hasNone
Returns
Type Description
System.Boolean

TagDisplayNames(Object, Boolean)

Declaration
public static IEnumerable<LocString> TagDisplayNames(this object obj, bool includeHidden = true)
Parameters
Type Name Description
System.Object obj
System.Boolean includeHidden
Returns
Type Description
System.Collections.Generic.IEnumerable<LocString>

TaggedItems(Tag)

Declaration
public static IEnumerable<Item> TaggedItems(this Tag tag)
Parameters
Type Name Description
Tag tag
Returns
Type Description
System.Collections.Generic.IEnumerable<Item>

TaggedTypes(Tag)

Declaration
public static IEnumerable<Type> TaggedTypes(this Tag tag)
Parameters
Type Name Description
Tag tag
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Type>

TagNames(Object, Boolean)

Returns string collection of object's tags.

Declaration
public static IEnumerable<string> TagNames(this object obj, bool includeHidden = true)
Parameters
Type Name Description
System.Object obj
System.Boolean includeHidden
Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

Tags(Item)

Declaration
public static IEnumerable<Tag> Tags(this Item item)
Parameters
Type Name Description
Item item
Returns
Type Description
System.Collections.Generic.IEnumerable<Tag>

Tags(Type)

Declaration
public static IEnumerable<Tag> Tags(this Type type)
Parameters
Type Name Description
System.Type type
Returns
Type Description
System.Collections.Generic.IEnumerable<Tag>

TrySatisfySpecs(IEnumerable<IStack>, Item, Int32)

Given a list of specifications (a number of tags or items), modify it and return how many are satisfied by the passed in item and quantity.

Declaration
public static int TrySatisfySpecs(this IEnumerable<IStack> specStacks, Item item, int quantity)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IStack> specStacks
Item item
System.Int32 quantity
Returns
Type Description
System.Int32
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾