-
-
Notifications
You must be signed in to change notification settings - Fork 392
/
Copy pathIRecipe.cs
31 lines (24 loc) · 907 Bytes
/
IRecipe.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
using System;
using StardewValley;
namespace Pathoschild.Stardew.Automate;
/// <summary>Describes a generic recipe based on item input and output.</summary>
public interface IRecipe
{
/*********
** Accessors
*********/
/// <summary>Matches items that can be used as input.</summary>
Func<Item, bool> Input { get; }
/// <summary>The number of inputs needed.</summary>
int InputCount { get; }
/// <summary>The output to generate (given an input).</summary>
Func<Item, Item> Output { get; }
/// <summary>The time needed to prepare an output (given an input).</summary>
Func<Item, int> Minutes { get; }
/*********
** Methods
*********/
/// <summary>Get whether the recipe can accept a given item as input (regardless of stack size).</summary>
/// <param name="stack">The item to check.</param>
bool AcceptsInput(ITrackedStack stack);
}