Show / Hide Table of Contents

Class ColorItem

Base class for items that have color. Specifies color in name and tooltip with overrides. Is unique stackable and has caching of dynamic props.

Inheritance
System.Object
ItemLinkable
ItemRepresentation
Item
ColorItem
Implements
IItem
ILinkableParameterized<LinkConfig>
ILinkable
IHasIcon
IController
IViewController
IHasUniversalID
System.ComponentModel.INotifyPropertyChanged
Inherited Members
Item.ItemsInitialized
Item.RepresentsItemType(Type)
Item.CanStack(Item)
Item.Merge(Item, Int32, Int32, Boolean)
Item.OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
Item.ClearMaxStackSizeCache()
Item.GetMaxStackSize(Type)
Item.Destroy(Int32)
Item.ToString()
Item.UnsubscribeUnique()
Item.OnUsed(Player, ItemStack)
Item.OnLeftClicked(Player, ItemStack)
Item.OnSelected(Player)
Item.OnDeselected(Player)
Item.Get(IRepresentsItem)
Item.Get(Int32)
Item.Get<T>()
Item.Get(Type)
Item.Get(String)
Item.ShowName(Type, Single)
Item.ShowName(Type, Int32)
Item.ShowName<T>(Int32)
Item.NameAndNum(Type, Int32)
Item.GetSkillbookForSkillType(Type)
Item.CreatingItem(Type)
Item.GetCreatedObj(Type)
Item.TypeIsUnique(Type)
Item.GetNonUniqueOrClone(Int32)
Item.GetNonUniqueOrClone(Type)
Item.NameAndNum(Type, Single)
Item.Initialize()
Item.GetItemByString(User, String)
Item.GetID(Item)
Item.GetID(Type)
Item.HasID(Type)
Item.GetID<T>()
Item.GetType(Int32)
Item.GetType(String)
Item.Create<T>(Int32)
Item.Create(Type, Int32)
Item.Create<T>()
Item.Create(Type)
Item.IconName
Item.IconComment
Item.TypeID
Item.Type
Item.Name
Item.IsUnique
Item.Fuel
Item.IsFuel
Item.WeightWithoutModifiers
Item.Weight
Item.HasWeight
Item.IsCarried
Item.IgnoreAuth
Item.Yield
Item.HasYield
Item.HasCrop
Item.CanBeCurrency
Item.MakesRoads
Item.Compostable
Item.ResourcePile
Item.CanAirInteraction
Item.Category
Item.Hidden
Item.Group
Item.MaxStackSize
Item.IsWasteProduct
Item.GetDescription
Item.HandOrigin
Item.CanBeHeld
Item.IsTool
Item.CustomHighlight
Item.AllItemsIncludingHidden
Item.AllItemsExceptHidden
Item.RandomItem
ItemRepresentation.RepresentsItemType(Item)
ItemLinkable.ShowName(Single)
ItemLinkable.ShowName(Int32)
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.DisplayNamePlural
ItemLinkable.ControllerID
Namespace: Eco.Gameplay.Items
Assembly: Eco.Gameplay.dll
Syntax
public abstract class ColorItem : Item, IItem, ILinkableParameterized<LinkConfig>, ILinkable, IHasIcon, IController, IViewController, IHasUniversalID, INotifyPropertyChanged

Constructors

ColorItem()

Declaration
protected ColorItem()

ColorItem(ByteColor)

Declaration
protected ColorItem(ByteColor color)
Parameters
Type Name Description
ByteColor color

Properties

Color

Declaration
public ByteColor Color { get; protected set; }
Property Value
Type Description
ByteColor

ColoredOverlayName

Declaration
protected virtual string ColoredOverlayName { get; }
Property Value
Type Description
System.String

ColorName

Declaration
public LocString ColorName { get; }
Property Value
Type Description
LocString

DisplayName

Declaration
public override LocString DisplayName { get; }
Property Value
Type Description
LocString
Overrides
Item.DisplayName

IsStackable

Declaration
public override bool IsStackable { get; }
Property Value
Type Description
System.Boolean
Overrides
Item.IsStackable

Label

Declaration
public virtual LocString Label { get; }
Property Value
Type Description
LocString

MarkedUpName

Declaration
public override LocString MarkedUpName { get; }
Property Value
Type Description
LocString
Overrides
ItemLinkable.MarkedUpName

StackingHash

Declaration
public override int StackingHash { get; }
Property Value
Type Description
System.Int32
Overrides
Item.StackingHash

Methods

Clone()

Declaration
public override Item Clone()
Returns
Type Description
Item
Overrides
Item.Clone()

ItemIconUILink(LocString)

Declaration
protected override LocString ItemIconUILink(LocString text)
Parameters
Type Name Description
LocString text
Returns
Type Description
LocString
Overrides
ItemLinkable.ItemIconUILink(LocString)

RepresentativeHash()

Declaration
public override int RepresentativeHash()
Returns
Type Description
System.Int32
Overrides
ItemRepresentation.RepresentativeHash()

RepresentsItem(Item)

Declaration
public override bool RepresentsItem(Item other)
Parameters
Type Name Description
Item other
Returns
Type Description
System.Boolean
Overrides
Item.RepresentsItem(Item)

SetColor(ByteColor)

Declaration
public void SetColor(ByteColor color)
Parameters
Type Name Description
ByteColor color

Events

PropertyChanged

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
System.ComponentModel.PropertyChangedEventHandler

Implements

IItem
ILinkableParameterized<T>
ILinkable
IHasIcon
IController
IViewController
IHasUniversalID
System.ComponentModel.INotifyPropertyChanged

Extension Methods

ItemStackExtensions.NameAndNum(ItemRepresentation, Int32)
ItemUtils.CanItemExistInInventories(Item)
ItemUtils.CloneIfNeeded(Item)
TagUtils.Tags(Item)
TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
MarketplaceExtensions.IsPaidItem(Item)
TypeTooltipExtensions.UILinkGeneric(Object)
EconomyTooltipLibrary.BuyItTooltip(Item, User, TooltipOrigin)
EconomyTooltipLibrary.SellItTooltip(Item, User, TooltipOrigin)
EconomyTooltipLibrary.BuyItTooltipPaintBucket(ColorItem, User, TooltipOrigin)
EconomyTooltipLibrary.SellItTooltipPaintBucket(ColorItem, User, TooltipOrigin)
ILinkableTooltipLibrary.ItemLinkClicked(Item, TooltipOrigin)
ItemTooltipLibrary.Tooltip(ColorItem)
ItemTooltipLibrary.ColorItemTitle(ColorItem)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾