-
-
Notifications
You must be signed in to change notification settings - Fork 392
/
Copy pathITrackedStack.cs
32 lines (25 loc) · 1.12 KB
/
ITrackedStack.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using StardewValley;
namespace Pathoschild.Stardew.Automate;
/// <summary>An item stack in an input pipe which can be reduced or taken.</summary>
public interface ITrackedStack
{
/*********
** Accessors
*********/
/// <summary>A sample item for comparison.</summary>
/// <remarks>This should be equivalent to the underlying item (except in stack size), but *not* a reference to it.</remarks>
Item Sample { get; }
/// <summary>The identifier for the type definition which contains the item, matching one of the <see cref="ItemRegistry"/> <c>type_</c> constants.</summary>
string Type { get; }
/// <summary>The number of items in the stack.</summary>
int Count { get; }
/*********
** Public methods
*********/
/// <summary>Remove the specified number of this item from the stack.</summary>
/// <param name="count">The number to consume.</param>
void Reduce(int count);
/// <summary>Remove the specified number of this item from the stack and return a new stack matching the count.</summary>
/// <param name="count">The number to get.</param>
Item? Take(int count);
}