Beispiel #1
0
        private void ConduitUpdate(float dt)
        {
            if (this.operational.IsOperational)
            {
                SolidConduitFlow flowManager = SolidConduit.GetFlowManager();
                if (!flowManager.HasConduit(this.inputCell) || !flowManager.HasConduit(this.outputCell) ||
                    !flowManager.IsConduitFull(this.inputCell) || !flowManager.IsConduitEmpty(this.outputCell))
                {
                    return;
                }

                Pickupable pickupable = flowManager.RemovePickupable(this.inputCell);
                if (!(bool)((UnityEngine.Object)pickupable))
                {
                    return;
                }

                flowManager.AddPickupable(this.outputCell, pickupable);

                this.operational.SetActive(false);
            }
        }
Beispiel #2
0
        private void ConduitUpdate(float dt)
        {
            bool flag = false;

            if (this.operational.IsOperational)
            {
                SolidConduitFlow flowManager = SolidConduit.GetFlowManager();
                if (!flowManager.HasConduit(this.inputCell) || !flowManager.HasConduit(this.outputCell) ||
                    !flowManager.HasConduit(this.filteredCell) || (!flowManager.IsConduitFull(this.inputCell) ||
                                                                   !flowManager.IsConduitEmpty(this.outputCell) ||
                                                                   !flowManager.IsConduitEmpty(this.filteredCell)))
                {
                    return;
                }

                var acceptedTags = treeFilterable.AcceptedTags;

                Pickupable pickupable = flowManager.RemovePickupable(this.inputCell);
                if (!(bool)((UnityEngine.Object)pickupable))
                {
                    return;
                }

                foreach (var acceptedTag in acceptedTags)
                {
                    if (pickupable.HasTag(acceptedTag))
                    {
                        flowManager.AddPickupable(this.filteredCell, pickupable);
                        return;
                    }
                }

                flowManager.AddPickupable(this.outputCell, pickupable);
                this.operational.SetActive(flag, false);
            }
        }
Beispiel #3
0
 private void ConduitUpdate(float dt)
 {
     dispensing = false;
     if (!(bool)operational || operational.IsOperational)
     {
         SolidConduitFlow flowManager = SolidConduit.GetFlowManager();
         if (flowManager.HasConduit(inputCell) && flowManager.HasConduit(outputCell) && flowManager.IsConduitFull(inputCell) && flowManager.IsConduitEmpty(outputCell))
         {
             Pickupable pickupable = flowManager.RemovePickupable(inputCell);
             if ((bool)pickupable)
             {
                 flowManager.AddPickupable(outputCell, pickupable);
                 dispensing = true;
             }
         }
     }
 }
Beispiel #4
0
        private void ConduitUpdate(float dt)
        {
            SolidConduitFlow flowManager = SolidConduit.GetFlowManager();

            if (!flowManager.HasConduit(this._inputCell) || !flowManager.HasConduit(this._outputCell) || !flowManager.IsConduitFull(this._inputCell) || (!flowManager.IsConduitEmpty(this._outputCell)))
            {
                return;
            }


            Pickupable pickupable = flowManager.RemovePickupable(_inputCell);

            flowManager.AddPickupable(this._outputCell, pickupable);
            if (!(bool)((UnityEngine.Object)pickupable))
            {
                return;
            }
            if (flowManager.HasConduit(this._filteredCell) && flowManager.IsConduitEmpty(this._filteredCell))
            {
                Pickupable pickupable2 = EntityPrefabs.Instantiate(pickupable);
                flowManager.AddPickupable(this._filteredCell, pickupable2);
            }
            this.operational.SetActive(false, false);
        }