S9SourceNine Labs / CMAPI Docs 1.1
CMAPI / API reference

InventoryContext

Read-only native inventory metadata supplied to slot providers.

View source ↗
CMAPI 1.1.4Standalone runtimeWindows x64Tested with Planet Crafter 2.008
Namespace CMAPIClassAssembly CMAPI.API.dll
public sealed class InventoryContext

Read-only native inventory metadata supplied to slot providers.

Members

InventoryId

property
public int InventoryId

Gets the game's inventory identifier.

NativeCapacity

property
public int NativeCapacity

Gets the inventory's native slot capacity.

PhysicalItemCount

property
public int PhysicalItemCount

Gets the number of individual world objects stored by the game.

Kind

property
public InventoryKind Kind

Gets the detected native inventory role.

NetworkMode

property
public InventoryNetworkMode NetworkMode

Gets the local peer's network role.

IsMultiplayer

property
public bool IsMultiplayer =>

Gets whether the current session is networked.

HasServerAuthority

property
public bool HasServerAuthority =>

Gets whether the local peer has server authority.

InventoryContext

method
public InventoryContext( int inventoryId, int nativeCapacity, int physicalItemCount, InventoryKind kind, InventoryNetworkMode networkMode)

Creates immutable inventory context metadata.