Show / Hide Table of Contents

Class ItemRepresentation

Represents a specific item or a group of items.

Inheritance
System.Object
ItemLinkable
ItemRepresentation
Item
Tag
Implements
IController
IViewController
IHasUniversalID
ILinkableParameterized<LinkConfig>
ILinkable
Inherited Members
ItemLinkable.OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
ItemLinkable.ShowName(Single)
ItemLinkable.ShowName(Int32)
ItemLinkable.ToString()
ItemLinkable.UILinkAndNumber(Single)
ItemLinkable.UILinkAndNumber(Int32)
ItemLinkable.UILinkAndNumber(Int32, String)
ItemLinkable.UILinkAndNumberAndTier(Int32, Int32)
ItemLinkable.UILinkAndNumberAndTierPrepend(Int32, Int32, String)
ItemLinkable.UILinkAndNumberNoText(Int32)
ItemLinkable.UILinkContent()
ItemLinkable.UILinkContent(Boolean)
ItemLinkable.NameAndNum(Int32)
ItemLinkable.UILinkAndStyledNumber(Int32)
ItemLinkable.UILinkContent(LocString)
ItemLinkable.UILinkNoNumber(Int32)
ItemLinkable.UILinkContent(LinkConfig)
ItemLinkable.ItemIconUILink(LocString)
ItemLinkable.DisplayName
ItemLinkable.DisplayNamePlural
ItemLinkable.MarkedUpName
ItemLinkable.Name
ItemLinkable.ControllerID
Namespace: Eco.Gameplay.Items
Assembly: Eco.Gameplay.dll
Syntax
public abstract class ItemRepresentation : ItemLinkable, IController, IViewController, IHasUniversalID, ILinkableParameterized<LinkConfig>, ILinkable

Constructors

ItemRepresentation()

Declaration
protected ItemRepresentation()

Methods

RepresentativeHash()

If two items have the same hash they're identical. Note that this doesnt use 'quality groups', only exact identical.

Declaration
public virtual int RepresentativeHash()
Returns
Type Description
System.Int32

RepresentsItem(Item)

Checks if this instance represents the given item taking into the account its type and any unique properties it might have, like durability level, using rules defined for that specific item type.

Declaration
public abstract bool RepresentsItem(Item item)
Parameters
Type Name Description
Item item
Returns
Type Description
System.Boolean
Remarks

Use this method if you need custom comparison rules for unique items, like similar durability levels or same associated settlement. If only item type is relevant, use RepresentsItemType(Type) instead.

RepresentsItemType(Item)

Checks if this instance represents an item of the same type as item. If this instance represents more than one item type it checks if those types include that one.

Declaration
public bool RepresentsItemType(Item item)
Parameters
Type Name Description
Item item
Returns
Type Description
System.Boolean
Remarks

This method of checking for item match ignores any unique properties an item instance might have and only checks the type. If matching some conditions other than type for a unique item (like durability level) is necessary use RepresentsItem(Item) instead.

RepresentsItemType(Type)

Checks if this instance represents an item of the given type. If this instance represents more than one item type it checks if those types include that one.

Declaration
public abstract bool RepresentsItemType(Type itemType)
Parameters
Type Name Description
System.Type itemType
Returns
Type Description
System.Boolean
Remarks

This method of checking for item match ignores any unique properties an item instance might have and only checks the type. If matching some conditions other than type for a unique item (like durability level) is necessary use RepresentsItem(Item) instead.

Implements

IController
IViewController
IHasUniversalID
ILinkableParameterized<T>
ILinkable

Extension Methods

ItemStackExtensions.NameAndNum(ItemRepresentation, Int32)
TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾