public sealed class PlayerInventorySnapshotContains a point-in-time view of one local-player inventory.
Members
KindGets which player inventory this snapshot represents.propertyIsAvailableGets whether the inventory was available.propertyInventoryIdGets the save-local inventory ID, or -1 when unavailable.propertyCapacityGets the inventory's slot capacity.propertyOccupiedSlotsGets the number of occupied slots.propertyMaxGets the number of unoccupied slots.methodIsFullGets whether every available slot is occupied.propertyItemsGets item counts aggregated by stable group ID.propertyKind
propertypublic PlayerInventoryKind KindGets which player inventory this snapshot represents.
IsAvailable
propertypublic bool IsAvailableGets whether the inventory was available.
InventoryId
propertypublic int InventoryIdGets the save-local inventory ID, or -1 when unavailable.
Capacity
propertypublic int CapacityGets the inventory's slot capacity.
OccupiedSlots
propertypublic int OccupiedSlotsGets the number of occupied slots.
Max
methodpublic int FreeSlots => Math.Max(0, Capacity - OccupiedSlots)Gets the number of unoccupied slots.
IsFull
propertypublic bool IsFull => IsAvailable && OccupiedSlots >= CapacityGets whether every available slot is occupied.
Items
propertypublic IReadOnlyList<InventoryItemSnapshot> ItemsGets item counts aggregated by stable group ID.