RecipePageEntry.cs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. namespace RecipeMenuCore.API
  2. {
  3. public class RecipePageEntry
  4. {
  5. /// <summary>
  6. /// The ultimate items in UltimateFore recipes or the inputs in other recipes.
  7. /// </summary>
  8. public int[] ItemIdExtension { get; protected set; }
  9. /// <summary>
  10. /// The normal item in UltimateFore recipes or the output in other recipes.
  11. /// </summary>
  12. public int ItemIdBase { get; protected set; }
  13. /// <summary>
  14. /// The MinAmount of items created from a recipe.
  15. /// </summary>
  16. public int MinAmount { get; protected set; }
  17. /// <summary>
  18. /// The MaxBonusAmount to be added to the base value.
  19. /// </summary>
  20. public int MaxBonusAmount { get; protected set; }
  21. /// <summary>
  22. /// Should the input be visible, if the craft has never been done before.
  23. /// </summary>
  24. public bool AllwaysShowInput { get; protected set; }
  25. /// <summary>
  26. /// Use to create a new RecipePageEntry.
  27. /// </summary>
  28. /// <param name="id1">The first ultimate item in UltimateFore recipes or the first input in other recipes.</param>
  29. /// <param name="id2">The second ultimate item in UltimateFore recipes or the second input in other recipes.</param>
  30. /// <param name="id3">The third ultimate item in UltimateFore recipes or the third input in other recipes.</param>
  31. /// <param name="idBase">The normal item in UltimateFore recipes or the output in other recipes.</param>
  32. /// <param name="min">The minimum amount of items created from a recipe.</param>
  33. /// <param name="maxBonus">The maximum bonus amount of items created from a recipe.</param>
  34. public RecipePageEntry(int id1, int id2, int id3, int idBase, int min = 1, int maxBonus = 0)
  35. {
  36. ItemIdExtension = new int[] { id1, id2, id3 };
  37. ItemIdBase = idBase;
  38. MinAmount = min;
  39. MaxBonusAmount = maxBonus;
  40. }
  41. /// <summary>
  42. /// Use to create a new RecipePageEntry.
  43. /// </summary>
  44. /// <param name="id1">The first ultimate item in UltimateFore recipes or the first input in other recipes.</param>
  45. /// <param name="id2">The second ultimate item in UltimateFore recipes or the second input in other recipes.</param>
  46. /// <param name="id3">The third ultimate item in UltimateFore recipes or the third input in other recipes.</param>
  47. /// <param name="idBase">The normal item in UltimateFore recipes or the output in other recipes.</param>
  48. /// <param name="min">The minimum amount of items created from a recipe.</param>
  49. /// <param name="maxBonus">The maximum bonus amount of items created from a recipe.</param>
  50. public RecipePageEntry(int id1, int id2, int id3, int idBase, int min = 1, int maxBonus = 0, bool allwaysShowInput = false)
  51. {
  52. ItemIdExtension = new int[] { id1, id2, id3 };
  53. ItemIdBase = idBase;
  54. MinAmount = min;
  55. MaxBonusAmount = maxBonus;
  56. AllwaysShowInput = allwaysShowInput;
  57. }
  58. }
  59. }