Let stacks specify if they get thrown as one item, or individual… (#679)

This commit is contained in:
Profane McBane
2020-02-13 22:43:02 +00:00
committed by GitHub
parent 7f9d2f9dbf
commit 9e368b336f
2 changed files with 14 additions and 2 deletions

View File

@@ -26,6 +26,7 @@ namespace Content.Server.GameObjects.Components.Stack
private const string SerializationCache = "stack";
private int _count = 50;
private int _maxCount = 50;
private bool _throwIndividually = false;
[ViewVariables(VVAccess.ReadWrite)]
public int Count
@@ -53,6 +54,17 @@ namespace Content.Server.GameObjects.Components.Stack
}
}
[ViewVariables(VVAccess.ReadWrite)]
public bool ThrowIndividually
{
get => _throwIndividually;
private set
{
_throwIndividually = value;
Dirty();
}
}
[ViewVariables]
public int AvailableSpace => MaxCount - Count;