v1.1.18.0 (Treacherous Tides Update)

This commit is contained in:
Regalis11
2023-10-19 19:28:43 +03:00
parent 34ffc520cc
commit df7e8f1625
21 changed files with 196 additions and 89 deletions
@@ -443,11 +443,11 @@ namespace Barotrauma.Items.Components
// Set the contained items active if there's an item inserted inside the container. Enables e.g. the rifle flashlight when it's attached to the rifle (put inside of it).
SetContainedActive(true);
}
if (containedItem.FlippedX)
if (containedItem.FlippedX != item.FlippedX)
{
containedItem.FlipX(relativeToSub: false);
}
if (containedItem.FlippedY)
if (containedItem.FlippedY != item.FlippedY)
{
containedItem.FlipY(relativeToSub: false);
}
@@ -1319,17 +1319,20 @@ namespace Barotrauma
}
}
for (int i = 0; i < components.Count && i < clone.components.Count; i++)
if (clonedContainedItems.Any())
{
ItemComponent component = components[i],
cloneComp = clone.components[i];
if (component is not CircuitBox origBox || cloneComp is not CircuitBox cloneBox)
for (int i = 0; i < components.Count && i < clone.components.Count; i++)
{
continue;
}
ItemComponent component = components[i],
cloneComp = clone.components[i];
cloneBox.CloneFrom(origBox, clonedContainedItems);
if (component is not CircuitBox origBox || cloneComp is not CircuitBox cloneBox)
{
continue;
}
cloneBox.CloneFrom(origBox, clonedContainedItems);
}
}
clone.FullyInitialized = true;
@@ -3230,7 +3233,7 @@ namespace Barotrauma
SetDroppedStackItemStates();
droppedStack = null;
#if SERVER
if (GameMain.NetworkMember is { IsServer: true } server)
if (GameMain.NetworkMember is { IsServer: true } server && !Removed)
{
server.CreateEntityEvent(this, new DroppedStackEventData(Enumerable.Empty<Item>()));
}