Show / Hide Table of Contents

    Interface IItem

    Interface for all items in the game.

    Inherited Members
    IThing.LocationChanged
    IThing.TypeId
    IThing.UniqueId
    IThing.CanBeMoved
    IThing.TrackedEvents
    IThing.DescribeForLogger()
    IThing.StartTrackingEvent(IEvent, String)
    IThing.StopTrackingEvent(IEvent, String)
    ILocatable.Location
    ILocatable.CarryLocation
    System.IEquatable<Fibula.Common.Contracts.Abstractions.IThing>.Equals(Fibula.Common.Contracts.Abstractions.IThing)
    ICloneableThing<IThing>.Clone()
    IContainedThing.ParentContainer
    Namespace: Fibula.Items.Contracts.Abstractions
    Assembly: Fibula.Items.Contracts.dll
    Syntax
    public interface IItem : IThing, ILocatable, IEquatable<IThing>, ICloneableThing<IThing>, IContainedThing

    Properties

    | Improve this Doc View Source

    Amount

    Gets or sets the amount of this item.

    Declaration
    byte Amount { get; set; }
    Property Value
    Type Description
    System.Byte
    | Improve this Doc View Source

    Attributes

    Gets the attributes of this item.

    Declaration
    IDictionary<ItemAttribute, IConvertible> Attributes { get; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<ItemAttribute, System.IConvertible>
    | Improve this Doc View Source

    BlocksLay

    Gets a value indicating whether the item blocks laying anything on it.

    Declaration
    bool BlocksLay { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    BlocksPass

    Gets a value indicating whether the item blocks walking on it.

    Declaration
    bool BlocksPass { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    BlocksThrow

    Gets a value indicating whether the item blocks throwing through it.

    Declaration
    bool BlocksThrow { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CanBeDressed

    Gets a value indicating whether this item can be dressed.

    Declaration
    bool CanBeDressed { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CanBeRotated

    Gets a value indicating whether this item can be rotated.

    Declaration
    bool CanBeRotated { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    ChangeOnUseTo

    Gets the Id of the item into which this will change upon use. Callers must check ChangesOnUse to verify this item does indeed have a target.

    Declaration
    ushort ChangeOnUseTo { get; }
    Property Value
    Type Description
    System.UInt16
    | Improve this Doc View Source

    ChangesOnUse

    Gets a value indicating whether this item changes on use.

    Declaration
    bool ChangesOnUse { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    DressPosition

    Gets the position at which the item can be dressed.

    Declaration
    Slot DressPosition { get; }
    Property Value
    Type Description
    Slot
    | Improve this Doc View Source

    ExpirationTarget

    Gets the Id of the item into which this will expire to, if it HasExpiration.

    Declaration
    ushort ExpirationTarget { get; }
    Property Value
    Type Description
    System.UInt16
    Exceptions
    Type Condition
    System.InvalidOperationException

    When the item does not expire.

    | Improve this Doc View Source

    ExpirationTimeLeft

    Gets the time left before this item expires, if it HasExpiration.

    Declaration
    TimeSpan ExpirationTimeLeft { get; }
    Property Value
    Type Description
    System.TimeSpan
    Exceptions
    Type Condition
    System.InvalidOperationException

    When the item does not expire.

    | Improve this Doc View Source

    HasCollision

    Gets a value indicating whether this item triggers a collision event.

    Declaration
    bool HasCollision { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    HasExpiration

    Gets a value indicating whether this item expires.

    Declaration
    bool HasExpiration { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    HasSeparation

    Gets a value indicating whether this item triggers a separation event.

    Declaration
    bool HasSeparation { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsContainer

    Gets a value indicating whether this item is a container.

    Declaration
    bool IsContainer { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsCumulative

    Gets a value indicating whether this item can be accumulated.

    Declaration
    bool IsCumulative { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsGround

    Gets a value indicating whether this item is ground floor.

    Declaration
    bool IsGround { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsGroundFix

    Gets a value indicating whether this item is clipped to the ground.

    Declaration
    bool IsGroundFix { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsLiquidContainer

    Gets a value indicating whether this item is a liquid container.

    Declaration
    bool IsLiquidContainer { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsLiquidPool

    Gets a value indicating whether this item is a liquid pool.

    Declaration
    bool IsLiquidPool { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsLiquidSource

    Gets a value indicating whether this item is a liquid source.

    Declaration
    bool IsLiquidSource { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    LiquidType

    Gets the type of liquid in this item, assuming it: IsLiquidPool, IsLiquidSource, or IsLiquidContainer.

    Declaration
    LiquidType LiquidType { get; }
    Property Value
    Type Description
    LiquidType
    | Improve this Doc View Source

    MovementPenalty

    Gets the movement cost for walking over this item, assuming it IsGround.

    Declaration
    byte MovementPenalty { get; }
    Property Value
    Type Description
    System.Byte
    | Improve this Doc View Source

    RotateTo

    Gets the Id of the item into which this will rotate to. Callers must check CanBeRotated to verify this item does indeed have a target.

    Declaration
    ushort RotateTo { get; }
    Property Value
    Type Description
    System.UInt16
    | Improve this Doc View Source

    StaysOnBottom

    Gets a value indicating whether this item stays on the bottom of the stack.

    Declaration
    bool StaysOnBottom { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    StaysOnTop

    Gets a value indicating whether this item stays on top of the stack.

    Declaration
    bool StaysOnTop { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Type

    Gets a reference to this item's IItemTypeEntity.

    Declaration
    IItemTypeEntity Type { get; }
    Property Value
    Type Description
    IItemTypeEntity

    Methods

    | Improve this Doc View Source

    IsPathBlocking(Byte)

    Determines if this item is blocks pathfinding.

    Declaration
    bool IsPathBlocking(byte avoidTypes = 14)
    Parameters
    Type Name Description
    System.Byte avoidTypes

    The damage types to avoid when checking for path blocking. By default, all types are considered path blocking.

    Returns
    Type Description
    System.Boolean

    True if the tile is considered path blocking, false otherwise.

    | Improve this Doc View Source

    Merge(IItem)

    Attempts to join an item to this item's content at the default index.

    Declaration
    (bool success, IItem surplusItem) Merge(IItem otherItem)
    Parameters
    Type Name Description
    IItem otherItem

    The item to join with.

    Returns
    Type Description
    System.ValueTuple<System.Boolean, IItem>

    True if the operation was successful, false otherwise. Along with any surplus of the item after merge.

    | Improve this Doc View Source

    Split(IItemFactory, Byte)

    Attempts to split this item into two based on the amount provided.

    Declaration
    (bool success, IItem itemProduced) Split(IItemFactory itemFactory, byte amount)
    Parameters
    Type Name Description
    IItemFactory itemFactory

    A reference to the item factory in use.

    System.Byte amount

    The amount of the item to split.

    Returns
    Type Description
    System.ValueTuple<System.Boolean, IItem>

    True if the operation was successful, false otherwise, along with the item produced, if any.

    Extension Methods

    ContainerExtensions.GetParentContainerHierarchy(IContainedThing, Boolean)
    ItemExtensions.GetCarrier(IItem)
    ThingExtensions.RemainingExhaustionTime(IThing, ExhaustionType, DateTimeOffset)
    ThingExtensions.HasCondition(IThing, ConditionType)
    ThingExtensions.IsExhausted(IThing, ExhaustionType)
    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.