Пример #1
0
        // Completely replaces the original OnUse method in the BaseBioReactor
        internal void OnPdaOpen(BaseBioReactorGeometry model)
        {
            PdaIsOpen = true;
            OpenInPda = this;

            PDA pda = Player.main.GetPDA();

            Inventory.main.SetUsedStorage(BioReactor.container, false);
            pda.Open(PDATab.Inventory, model.storagePivot, new PDA.OnClose(OnPdaClose), 4f);
        }
        internal void OnPdaClose(PDA pda)
        {
            this.InventoryMapping = null;

            foreach (BioEnergy item in MaterialsProcessing)
            {
                item.DisplayText = null;
            }

            PdaIsOpen = false;
            OpenInPda = null;

            (BioReactor.container as IItemsContainer).onAddItem -= OnAddItemLate;
        }
        internal static CyBioReactorMini GetMiniReactor(ref BaseBioReactor bioReactor)
        {
            if (LookupMiniReactor.TryGetValue(bioReactor, out CyBioReactorMini existingBioMini))
            {
                return(existingBioMini);
            }

            var createdBioMini = new CyBioReactorMini(ref bioReactor);

            LookupMiniReactor.Add(bioReactor, createdBioMini);

            QuickLogger.Debug("CyBioReactorMini Connected");

            return(createdBioMini);
        }
        // Completely replaces the original OnUse method in the BaseBioReactor
        internal void OnPdaOpen(BaseBioReactorGeometry model)
        {
            fallbackGeometry = model;

            PdaIsOpen = true;
            OpenInPda = this;

            PDA pda = Player.main.GetPDA();

            Inventory.main.SetUsedStorage(BioReactor.container, false);
#if SUBNAUTICA
            pda.Open(PDATab.Inventory, model.storagePivot, new PDA.OnClose(OnPdaClose), 4f);
#elif BELOWZERO
            pda.Open(PDATab.Inventory, model.storagePivot, new PDA.OnClose(OnPdaClose));
#endif
        }