Merge remote-tracking branch 'upstream/master' into develop

This commit is contained in:
EvilFactory
2024-06-18 12:19:13 -03:00
263 changed files with 7788 additions and 2849 deletions
@@ -228,6 +228,9 @@ namespace Barotrauma
public readonly Entity Owner;
/// <summary>
/// Capacity, or the number of slots in the inventory.
/// </summary>
protected readonly int capacity;
protected readonly ItemSlot[] slots;
@@ -272,6 +275,21 @@ namespace Barotrauma
{
get { return capacity; }
}
public static bool IsDragAndDropGiveAllowed
{
get
{
// allowed for single player
if (GameMain.NetworkMember == null)
{
return true;
}
// controlled by server setting in multiplayer
return GameMain.NetworkMember.ServerSettings.AllowDragAndDropGive;
}
}
public int EmptySlotCount => slots.Count(i => !i.Empty());