Show / Hide Table of Contents

    Class Thing

    Class that represents all things in the game.

    Inheritance
    System.Object
    Thing
    Creature
    Item
    Implements
    IThing
    ILocatable
    IContainedThing
    System.IEquatable<IThing>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Fibula.Common
    Assembly: Fibula.Common.dll
    Syntax
    public abstract class Thing : IThing, ILocatable, IContainedThing, IEquatable<IThing>

    Constructors

    | Improve this Doc View Source

    Thing()

    Initializes a new instance of the Thing class.

    Declaration
    public Thing()

    Properties

    | Improve this Doc View Source

    CanBeMoved

    Gets a value indicating whether this thing can be moved.

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

    CarryLocation

    Gets the location where this thing is being carried at, if any.

    Declaration
    public abstract Location? CarryLocation { get; }
    Property Value
    Type Description
    System.Nullable<Location>
    | Improve this Doc View Source

    Conditions

    Gets the current condition information for the thing.

    Declaration
    public IDictionary<ConditionType, ICondition> Conditions { get; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<ConditionType, ICondition>
    Remarks

    The key is a ConditionType, and the value is the ICondition.

    | Improve this Doc View Source

    Location

    Gets this thing's location.

    Declaration
    public virtual Location Location { get; }
    Property Value
    Type Description
    Location
    | Improve this Doc View Source

    ParentContainer

    Gets or sets the parent container of this thing.

    Declaration
    public IThingContainer ParentContainer { get; set; }
    Property Value
    Type Description
    IThingContainer
    | Improve this Doc View Source

    TrackedEvents

    Gets the tracked events for this thing.

    Declaration
    public IDictionary<string, IEvent> TrackedEvents { get; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, IEvent>
    | Improve this Doc View Source

    TypeId

    Gets the type id of this thing.

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

    UniqueId

    Gets the unique id of this item.

    Declaration
    public Guid UniqueId { get; }
    Property Value
    Type Description
    System.Guid

    Methods

    | Improve this Doc View Source

    DescribeForLogger()

    Provides a string describing the current thing for logging purposes.

    Declaration
    public abstract string DescribeForLogger()
    Returns
    Type Description
    System.String

    The string to log.

    | Improve this Doc View Source

    Equals(IThing)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(IThing other)
    Parameters
    Type Name Description
    IThing other

    The other object to compare against.

    Returns
    Type Description
    System.Boolean

    True if the current object is equal to the other parameter, false otherwise.

    | Improve this Doc View Source

    RaiseLocationChanged(Location)

    Invokes the LocationChanged event on this thing.

    Declaration
    public void RaiseLocationChanged(Location fromLocation)
    Parameters
    Type Name Description
    Location fromLocation

    The location from which the change happened.

    | Improve this Doc View Source

    StartTrackingEvent(IEvent, String)

    Makes the thing start tracking an event.

    Declaration
    public void StartTrackingEvent(IEvent evt, string identifier = "")
    Parameters
    Type Name Description
    IEvent evt

    The event to stop tracking.

    System.String identifier

    Optional. The identifier under which to start tracking the event. If no identifier is provided, the event's type name is used.

    | Improve this Doc View Source

    StopTrackingEvent(IEvent, String)

    Makes the thing stop tracking an event.

    Declaration
    public void StopTrackingEvent(IEvent evt, string identifier = "")
    Parameters
    Type Name Description
    IEvent evt

    The event to stop tracking.

    System.String identifier

    Optional. The identifier under which to look for and stop tracking the event. If no identifier is provided, the event's type name is used.

    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Events

    | Improve this Doc View Source

    LocationChanged

    Event to invoke when the thing's location has changed.

    Declaration
    public event OnLocationChanged LocationChanged
    Event Type
    Type Description
    OnLocationChanged

    Implements

    IThing
    ILocatable
    IContainedThing
    System.IEquatable<T>

    Extension Methods

    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    ContainerExtensions.GetParentContainerHierarchy(IContainedThing, Boolean)
    ThingExtensions.RemainingCooldownTime(IThing, ConditionType, DateTimeOffset)
    ThingExtensions.AddOrExtendCondition(IThing, ICondition)
    • 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.