public bool AddItemToContainer(InventoryItem item)
        {
            _controller = item.item.GetComponent <DSSServerController>();

            if (_controller != null)
            {
                if (_controller.FCSFilteredStorage.Items != null)
                {
                    _items = new HashSet <ObjectData>(_controller.FCSFilteredStorage.Items);
                }
                if (_controller.FCSFilteredStorage.Filters != null)
                {
                    _filters = new List <Filter>(_controller.FCSFilteredStorage.Filters);
                }
            }

            DisplayManager.GoToPage(FilterPages.FilterPage);
            DisplayManager.UpdatePages();
            ToggleDummyServer();
            Destroy(item.item.gameObject);
            var pda = Player.main.GetPDA();

            if (pda.isOpen)
            {
                pda.Close();
            }
            return(true);
        }
예제 #2
0
        internal void Setup(DSSServerController mono)
        {
            _mono       = mono;
            _pickupable = _mono.gameObject.GetComponentInChildren <Pickupable>();
            _collider   = _pickupable?.gameObject.GetComponentInChildren <Collider>();

            if (FindAllComponents())
            {
                UpdateDisplay();
            }
        }