Example #1
0
 public void FixInputOutputInventories(MyInventoryConstraint inputInventoryConstraint, MyInventoryConstraint outputInventoryConstraint)
 {
     if (this.m_inventoryAggregate.InventoryCount != 2)
     {
         MyInventoryAggregate component = MyInventoryAggregate.FixInputOutputInventories(this.m_inventoryAggregate, inputInventoryConstraint, outputInventoryConstraint);
         base.Components.Remove <MyInventoryBase>();
         this.m_outputInventory = null;
         this.m_inputInventory  = null;
         base.Components.Add <MyInventoryBase>(component);
     }
 }
        public void FixInputOutputInventories(MyInventoryConstraint inputInventoryConstraint, MyInventoryConstraint outputInventoryConstraint)
        {
            if (m_inventoryAggregate.InventoryCount == 2)
            {
                return;
            }

            var fixedAggregate = MyInventoryAggregate.FixInputOutputInventories(m_inventoryAggregate, inputInventoryConstraint, outputInventoryConstraint);

            Components.Remove <MyInventoryBase>();
            m_outputInventory = null;
            m_inputInventory  = null;
            Components.Add <MyInventoryBase>(fixedAggregate);
        }