/// <summary> /// Copies received values from server about contents of storage container /// </summary> /// <param name="storagestate"></param> private void HandleStorageMessage(StorageHeldItemsMessage storagestate) { StoredEntities = new Dictionary <EntityUid, int>(storagestate.StoredEntities); StorageSizeUsed = storagestate.StorageSizeUsed; StorageCapacityMax = storagestate.StorageSizeMax; Window.BuildEntityList(); }
protected override void UpdateState(BoundUserInterfaceState state) { base.UpdateState(state); if (_window == null || state is not StorageBoundUserInterfaceState cast) { return; } _window?.BuildEntityList(cast); }