Skip to main content
Version: 1.0.0

Struct ContainerItems

Namespace: OblivionMp.Sdk.Common.Archetypes.Mixins
Assembly: OblivionMp.Sdk.Common.dll

The contents of a container.

[ArchetypeMixin]
public readonly struct ContainerItems : IInventory, IArchetypeMixin, IArchetypeQueryable, IEntityShape

Implements​

IInventory, IArchetypeMixin, IArchetypeQueryable, IEntityShape

Inherited Members​

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties​

ItemsCount​

How many entries the inventory holds.

public int ItemsCount { get; }

Property Value​

int

Methods​

AddItems(in InventoryEntry)​

[Changes("ContainerItems.Field.Items")]
public void AddItems(in InventoryEntry value)

Parameters​

value InventoryEntry

ClearItems()​

[Changes("ContainerItems.Field.Items")]
public void ClearItems()

ContainsItems(in InventoryEntry)​

public bool ContainsItems(in InventoryEntry value)

Parameters​

value InventoryEntry

Returns​

bool

GetItems()​

public NativeList<InventoryEntry>.ReadOnly GetItems()

Returns​

NativeList<InventoryEntry>.ReadOnly

GetItems(int)​

The entry at index.

public InventoryEntry GetItems(int index)

Parameters​

index int

Returns​

InventoryEntry

InsertItems(int, in InventoryEntry)​

[Changes("ContainerItems.Field.Items")]
public void InsertItems(int index, in InventoryEntry value)

Parameters​

index int

value InventoryEntry

Keep()​

This entity, which it already is: a loop over this shape hands over the shape itself.

public ContainerItems Keep()

Returns​

ContainerItems

Remarks​

Here so taking something out of a loop reads the same whichever way the loop walks. Whether a shape is walked by chunk follows from what it includes, which the call site cannot see and which changes when an include does.

RemoveAtItems(int)​

Removes the entry at index and returns it.

[Changes("ContainerItems.Field.Items")]
public InventoryEntry RemoveAtItems(int index)

Parameters​

index int

Returns​

InventoryEntry

SetItems(in NativeList<InventoryEntry>)​

[Changes("ContainerItems.Field.Items")]
public void SetItems(in NativeList<InventoryEntry> value)

Parameters​

value NativeList<InventoryEntry>

SetItems(int, in InventoryEntry)​

[Changes("ContainerItems.Field.Items")]
public void SetItems(int index, in InventoryEntry value)

Parameters​

index int

value InventoryEntry

  • Properties
    • ItemsCount
  • Methods
    • AddItems(in InventoryEntry)
    • ClearItems()
    • ContainsItems(in InventoryEntry)
    • GetItems()
    • GetItems(int)
    • InsertItems(int, in InventoryEntry)
    • Keep()
    • RemoveAtItems(int)
    • SetItems(in NativeList<InventoryEntry>)
    • SetItems(int, in InventoryEntry)