v0.12.0.2
This commit is contained in:
@@ -180,7 +180,7 @@ namespace Barotrauma
|
||||
if (allowNew && !targetContainer.OwnInventory.IsFull())
|
||||
{
|
||||
existingItems.Clear();
|
||||
foreach (var item in targetContainer.OwnInventory.Items)
|
||||
foreach (var item in targetContainer.OwnInventory.AllItems.Distinct())
|
||||
{
|
||||
existingItems.Add(item);
|
||||
}
|
||||
@@ -205,7 +205,7 @@ namespace Barotrauma
|
||||
base.Update(deltaTime);
|
||||
if (target == null)
|
||||
{
|
||||
target = targetContainer.OwnInventory.Items.FirstOrDefault(item => item != null && item.Prefab.Identifier == (containedPrefab != null ? itemContainerId : identifier) && !existingItems.Contains(item));
|
||||
target = targetContainer.ContainedItems.FirstOrDefault(item => item.Prefab.Identifier == (containedPrefab != null ? itemContainerId : identifier) && !existingItems.Contains(item));
|
||||
if (target != null)
|
||||
{
|
||||
if (containedPrefab != null)
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Barotrauma
|
||||
if (sabotageContainerIds.Contains(item.prefab.Identifier))
|
||||
{
|
||||
++totalAmount;
|
||||
if (item.OwnInventory.Items.Length <= 0 || item.OwnInventory.Items.All(containedItem => containedItem != null && !validReplacementIds.Contains(containedItem.Prefab.Identifier)))
|
||||
if (item.OwnInventory.AllItems.All(containedItem => !validReplacementIds.Contains(containedItem.Prefab.Identifier)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user