24 lines
655 B
C#
24 lines
655 B
C#
|
|
using OpenTheBox.Core.Enums;
|
||
|
|
|
||
|
|
namespace OpenTheBox.Core.Crafting;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// A crafting recipe that transforms ingredients into a result item at a specific workstation.
|
||
|
|
/// </summary>
|
||
|
|
public sealed record Recipe(
|
||
|
|
string Id,
|
||
|
|
string NameKey,
|
||
|
|
WorkstationType Workstation,
|
||
|
|
List<RecipeIngredient> Ingredients,
|
||
|
|
RecipeResult Result);
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// A single ingredient requirement for a recipe.
|
||
|
|
/// </summary>
|
||
|
|
public sealed record RecipeIngredient(string ItemDefinitionId, int Quantity);
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// The output of a completed recipe.
|
||
|
|
/// </summary>
|
||
|
|
public sealed record RecipeResult(string ItemDefinitionId, int Quantity);
|