コード例 #1
0
 /// <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();
 }
コード例 #2
0
        protected override void UpdateState(BoundUserInterfaceState state)
        {
            base.UpdateState(state);

            if (_window == null || state is not StorageBoundUserInterfaceState cast)
            {
                return;
            }

            _window?.BuildEntityList(cast);
        }