Merge remote-tracking branch 'upstream/master' into develop
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user