internal void Initialize(ExStorageDepotController mono) { _mono = mono; ITEMS_PER_PAGE = 16; if (FindAllComponents()) { PowerOnDisplay(); DrawPage(1); } else { QuickLogger.Error("Failed to find all components for the display."); } if (mono.NameController == null) { QuickLogger.Error("Name Controller is null", true); return; } mono.NameController.OnLabelChanged += OnLabelChanged; UpdateLabels(); }
internal void Initialize(ExStorageDepotController mono) { _mono = mono; ITEMS_PER_PAGE = 16; if (FindAllComponents()) { PowerOnDisplay(); DrawPage(1); SetItemCount(_mono.Storage.GetTotalCount()); //_mono.Storage.OnContainerUpdate += OnContainerUpdate; InvokeRepeating(nameof(OnContainerUpdate), 0.5f, 0.5f); InvokeRepeating(nameof(UpdateUnitID), 1f, 1f); } else { QuickLogger.Error("Failed to find all components for the display."); } if (mono.NameController == null) { QuickLogger.Error("Name Controller is null", true); return; } mono.NameController.OnLabelChanged += OnLabelChanged; UpdateLabels(); }
internal void Initialize(ExStorageDepotController mono) { _mono = mono; _containerHeight = _maxItems = QPatch.Config.MaxStorage; if (_containerRoot == null) { QuickLogger.Debug("Ex-Storage Root"); var storageRoot = new GameObject("ExStorageRoot"); storageRoot.transform.SetParent(mono.transform, false); _containerRoot = storageRoot.AddComponent <ChildObjectIdentifier>(); _mono = mono; } if (_container == null) { QuickLogger.Debug("Initializing Storage Container"); _container = _mono.gameObject.GetComponentInChildren <StorageContainer>(); _container.width = _containerWidth; _container.height = _containerHeight; _container.container.onRemoveItem += ContainerOnRemoveItem; _container.container.onAddItem += ContainerOnAddItem; _container.container.Resize(_containerWidth, _containerHeight); _container.storageLabel = ExStorageDepotBuildable.StorageContainerLabel(); } if (_dumpContainer == null) { QuickLogger.Debug("Initializing Dump Container"); _dumpContainer = new ItemsContainer(DumpContainerWidth, DumpContainerHeight, _containerRoot.transform, ExStorageDepotBuildable.DumpContainerLabel(), null); _dumpContainer.Resize(DumpContainerWidth, DumpContainerHeight); _dumpContainer.isAllowedToAdd += IsAllowedToAdd; } InvokeRepeating("UpdateStorageDisplayCount", 1, 0.5f); }
internal void Initialize(ExStorageDepotController mono) { QuickLogger.Debug("Initializing Storage Container"); _mono = mono; InvokeRepeating("UpdateStorageDisplayCount", 1, 0.5f); }
internal void Initialize(ExStorageDepotController mono) { _mono = mono; }