Class BodyContainerItem
Class that represents a container item for body slots.
Implements
Inherited Members
Namespace: Fibula.Items
Assembly: Fibula.Items.dll
Syntax
public class BodyContainerItem : ContainerItem, IContainerItem, IItem, IThing, IEquatable<IThing>, IContainedThing, IThingContainer, ILocatable
Constructors
| Improve this Doc View SourceBodyContainerItem(Slot)
Initializes a new instance of the BodyContainerItem class.
Declaration
public BodyContainerItem(Slot slot)
Parameters
Type | Name | Description |
---|---|---|
Slot | slot | The slot at which this body container is. |
Properties
| Improve this Doc View SourceCapacity
Gets the capacity of this container.
Declaration
public override byte Capacity { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Overrides
| Improve this Doc View SourceCarryLocation
Gets the location where this thing is being carried at, which is none for creatures.
Declaration
public override Location? CarryLocation { get; }
Property Value
Type | Description |
---|---|
System.Nullable<Location> |
Overrides
| Improve this Doc View SourceLocation
Gets this body container's location.
Declaration
public override Location Location { get; }
Property Value
Type | Description |
---|---|
Location |
Overrides
| Improve this Doc View SourceSlot
Gets this body container's slot.
Declaration
public Slot Slot { get; }
Property Value
Type | Description |
---|---|
Slot |
Methods
| Improve this Doc View SourceAddContent(IThingFactory, IThing, Byte)
Attempts to add a IThing to this container.
Declaration
public override (bool result, IThing remainder) AddContent(IThingFactory thingFactory, IThing thing, byte index = 255)
Parameters
Type | Name | Description |
---|---|---|
IThingFactory | thingFactory | A reference to the factory of things to use. |
IThing | thing | The IThing to add to the container. |
System.Byte | index | Optional. The index at which to add the IThing. Defaults to byte.MaxValue, which instructs to add the IThing at any free index. |
Returns
Type | Description |
---|---|
System.ValueTuple<System.Boolean, IThing> | A tuple with a value indicating whether the attempt was at least partially successful, and false otherwise. If the result was only partially successful, a remainder of the thing may be returned. |