Build 0.21.6.0 (1.0 pre-patch)

This commit is contained in:
Regalis11
2023-01-31 18:08:26 +02:00
parent e1c04bc31d
commit cf9ecd35b3
231 changed files with 4479 additions and 2276 deletions
@@ -268,6 +268,8 @@ namespace Barotrauma
get { return capacity; }
}
public int EmptySlotCount => slots.Count(i => !i.Empty());
public bool AllowSwappingContainedItems = true;
public Inventory(Entity owner, int capacity, int slotsPerRow = 5)
@@ -583,6 +585,8 @@ namespace Barotrauma
item.body.Enabled = false;
item.body.BodyType = FarseerPhysics.BodyType.Dynamic;
item.SetTransform(item.SimPosition, rotation: 0.0f, findNewHull: false);
//update to refresh the interpolated draw rotation and position (update doesn't run on disabled bodies)
item.body.Update();
}
#if SERVER
@@ -887,10 +891,7 @@ namespace Barotrauma
}
if (recursive)
{
if (item.OwnInventory != null)
{
item.OwnInventory.FindAllItems(predicate, recursive: true, list);
}
item.OwnInventory?.FindAllItems(predicate, recursive: true, list);
}
}
return list;