Class ItemUtils
Inheritance
System.Object
ItemUtils
Assembly: Eco.Gameplay.dll
Syntax
public static class ItemUtils : Object
Methods
CanItemExistInInventories(Item)
Declaration
public static bool CanItemExistInInventories(this Item item)
Parameters
Type |
Name |
Description |
Item |
item |
|
Returns
Type |
Description |
System.Boolean |
|
CloneIfNeeded(Item)
Clones the item if it's the representative item instance.
Declaration
public static Item CloneIfNeeded(this Item item)
Parameters
Type |
Name |
Description |
Item |
item |
|
Returns
GetItemsByBlockAttribute<T>(IEnumerable<BlockItem>)
Declaration
public static IEnumerable<Type> GetItemsByBlockAttribute<T>(this IEnumerable<BlockItem> blockItems)
where T : Attribute
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<BlockItem> |
blockItems |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
|
Type Parameters
GetItemsByTag(String[])
Declaration
public static HashSet<Type> GetItemsByTag(params string[] tags)
Parameters
Type |
Name |
Description |
System.String[] |
tags |
|
Returns
Type |
Description |
System.Collections.Generic.HashSet<System.Type> |
|
GetItemsByTwitchDropAttribute(IEnumerable<Item>)
Declaration
public static IEnumerable<Item> GetItemsByTwitchDropAttribute(this IEnumerable<Item> items)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<Item> |
items |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Item> |
|
GetRandomItems(Int32)
Declaration
public static IEnumerable<Item> GetRandomItems(int amount)
Parameters
Type |
Name |
Description |
System.Int32 |
amount |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Item> |
|
GetRepresentativeObject(ViewClassInfo)
Declaration
public static object GetRepresentativeObject(ViewClassInfo classInfo)
Parameters
Returns
Type |
Description |
System.Object |
|
GetRepresentativeObject(Int32)
Declaration
public static object GetRepresentativeObject(int typeID)
Parameters
Type |
Name |
Description |
System.Int32 |
typeID |
|
Returns
Type |
Description |
System.Object |
|
GetRepresentativeObject(Type)
Declaration
public static object GetRepresentativeObject(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Returns
Type |
Description |
System.Object |
|