Build 0.18.0.0

This commit is contained in:
Markus Isberg
2022-05-13 00:55:52 +09:00
parent 15d18e6ff6
commit 7547a9b78a
218 changed files with 3881 additions and 2192 deletions
@@ -320,7 +320,7 @@ namespace Barotrauma
private readonly int useItemCount;
private readonly bool removeItem, removeCharacter, breakLimb, hideLimb;
private readonly bool removeItem, dropContainedItems, removeCharacter, breakLimb, hideLimb;
private readonly float hideLimbTimer;
public readonly ActionType type = ActionType.OnActive;
@@ -608,6 +608,9 @@ namespace Barotrauma
case "removeitem":
removeItem = true;
break;
case "dropcontaineditems":
dropContainedItems = true;
break;
case "removecharacter":
removeCharacter = true;
break;
@@ -1224,6 +1227,22 @@ namespace Barotrauma
}
}
if (dropContainedItems)
{
for (int i = 0; i < targets.Count; i++)
{
if (targets[i] is Item item)
{
foreach (var itemContainer in item.GetComponents<ItemContainer>())
{
foreach (var containedItem in itemContainer.Inventory.AllItemsMod)
{
containedItem.Drop(dropper: null);
}
}
}
}
}
if (removeItem)
{
for (int i = 0; i < targets.Count; i++)