Skip to main content

Inventory

A class in Root.Township, Alta.Console.Commands.

Console result object that lists what a player holds: hand items, back and belt dock items, and their child items.

Constructors​

MemberWhat it is
Inventory(IPlayer player)Creates an Inventory from player.

Fields​

1 private and internal field
MemberWhat it is
private static Logger loggerNLog logger for this class.

Properties​

MemberWhat it is
List<EntityInfo> All { get; set; }Every item found, including children.
EntityInfo[] Back { get; set; }Items in the back docks, one per dock (null for empty).
EntityInfo[] Belt { get; set; }Items in the belt docks, one per dock (null for empty).
EntityInfo LeftHand { get; set; }Item in the left hand, or null.
EntityInfo RightHand { get; set; }Item in the right hand, or null.

Methods​

4 private and internal methods
MemberWhat it is
private EntityInfo[] AddBackDocks(PlayerCharacter character)Gets the item in each back dock and adds it and its children to All.
private EntityInfo[] AddBeltDocks(PlayerCharacter character)Gets the item in each belt dock and adds it and its children to All.
private void AddChildren(NetworkEntity entity)Adds every child entity that is a prefab root to All, going down the whole tree.
private EntityInfo AddHandItem(Controller handController)Gets the hand's held entity and adds its children. It adds LeftHand to All rather than the held item, so All can be wrong.