diff --git a/Sources/Sandbox.Game/ModAPI/MyInventory_ModAPI.cs b/Sources/Sandbox.Game/ModAPI/MyInventory_ModAPI.cs index b6aa232bd..8f9700eb1 100644 --- a/Sources/Sandbox.Game/ModAPI/MyInventory_ModAPI.cs +++ b/Sources/Sandbox.Game/ModAPI/MyInventory_ModAPI.cs @@ -100,14 +100,12 @@ private bool TransferItemsTo(IMyInventory dst, int sourceItemIndex, int? targetI return false; } - List reachableVertices = new List(); - private bool IsConnected(MyInventory dstInventory) { var srcConveyor = (this.Owner as IMyConveyorEndpointBlock); if (srcConveyor != null) { - reachableVertices.Clear(); + var reachableVertices = new List(); MyGridConveyorSystem.FindReachable(srcConveyor.ConveyorEndpoint, reachableVertices, (vertex) => vertex.CubeBlock != null); foreach (var vertex in reachableVertices) {