|
@@ -1,32 +1,106 @@
|
|
|
-namespace RecipeMenuCore.API
|
|
|
|
|
|
|
+using System;
|
|
|
|
|
+
|
|
|
|
|
+namespace RecipeMenuCore.API
|
|
|
{
|
|
{
|
|
|
public class RecipePageEntry
|
|
public class RecipePageEntry
|
|
|
{
|
|
{
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// The ultimate items in UltimateFore recipes or the inputs in other recipes.
|
|
/// The ultimate items in UltimateFore recipes or the inputs in other recipes.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
- public int[] ItemIdExtension { get; protected set; }
|
|
|
|
|
|
|
+ [Obsolete]
|
|
|
|
|
+ public int[] ItemIdExtension
|
|
|
|
|
+ {
|
|
|
|
|
+ get
|
|
|
|
|
+ {
|
|
|
|
|
+ if (ItemIds != null && ItemIds.Length == 4)
|
|
|
|
|
+ return new int[] { ItemIds[0], ItemIds[1], ItemIds[2] };
|
|
|
|
|
+ return new int[3];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// The normal item in UltimateFore recipes or the output in other recipes.
|
|
/// The normal item in UltimateFore recipes or the output in other recipes.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
- public int ItemIdBase { get; protected set; }
|
|
|
|
|
|
|
+ [Obsolete]
|
|
|
|
|
+ public int ItemIdBase
|
|
|
|
|
+ {
|
|
|
|
|
+ get
|
|
|
|
|
+ {
|
|
|
|
|
+ if (ItemIds != null && ItemIds.Length == 4)
|
|
|
|
|
+ return ItemIds[3];
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// The MinAmount of items created from a recipe.
|
|
/// The MinAmount of items created from a recipe.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
- public int MinAmount { get; protected set; }
|
|
|
|
|
|
|
+ [Obsolete]
|
|
|
|
|
+ public int MinAmount
|
|
|
|
|
+ {
|
|
|
|
|
+ get
|
|
|
|
|
+ {
|
|
|
|
|
+ if (MinAmounts != null && MinAmounts.Length == 4)
|
|
|
|
|
+ return MinAmounts[3];
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// The MaxBonusAmount to be added to the base value.
|
|
/// The MaxBonusAmount to be added to the base value.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
- public int MaxBonusAmount { get; protected set; }
|
|
|
|
|
|
|
+ [Obsolete]
|
|
|
|
|
+ public int MaxBonusAmount
|
|
|
|
|
+ {
|
|
|
|
|
+ get
|
|
|
|
|
+ {
|
|
|
|
|
+ if (MaxBonusAmounts != null && MaxBonusAmounts.Length == 4)
|
|
|
|
|
+ return MaxBonusAmounts[3];
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// Should the input be visible, if the craft has never been done before.
|
|
/// Should the input be visible, if the craft has never been done before.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
public bool AllwaysShowInput { get; protected set; }
|
|
public bool AllwaysShowInput { get; protected set; }
|
|
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// All 4 items used in the recipe.
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ public int[] ItemIds { get; protected set; }
|
|
|
|
|
+
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// The Minimum amount of items required or created of each of the 4 items.
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ public int[] MinAmounts { get; protected set; }
|
|
|
|
|
+
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// The MaxBonusAmount to be added to the base value (output only).
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ public int[] MaxBonusAmounts { get; protected set; }
|
|
|
|
|
+
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// States if the recipe is a 3 to 1 or a 1 to 3 items recipe.
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ public bool IsReverse { get; protected set; }
|
|
|
|
|
+
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// Use to create a new RecipePageEntry.
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ /// <param name="id1">The first ultimate item in UltimateFore recipes or the first input in other recipes.</param>
|
|
|
|
|
+ /// <param name="id2">The second ultimate item in UltimateFore recipes or the second input in other recipes.</param>
|
|
|
|
|
+ /// <param name="id3">The third ultimate item in UltimateFore recipes or the third input in other recipes.</param>
|
|
|
|
|
+ /// <param name="idBase">The normal item in UltimateFore recipes or the output in other recipes.</param>
|
|
|
|
|
+ public RecipePageEntry(int id1, int id2, int id3, int idBase)
|
|
|
|
|
+ {
|
|
|
|
|
+ ItemIds = new int[] { id1, id2, id3, idBase };
|
|
|
|
|
+ MinAmounts = new int[] { 1, 1, 1, 1 };
|
|
|
|
|
+ MaxBonusAmounts = new int[] { 0, 0, 0, 0 };
|
|
|
|
|
+ AllwaysShowInput = false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// Use to create a new RecipePageEntry.
|
|
/// Use to create a new RecipePageEntry.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -38,10 +112,9 @@
|
|
|
/// <param name="maxBonus">The maximum bonus amount of items created from a recipe.</param>
|
|
/// <param name="maxBonus">The maximum bonus amount of items created from a recipe.</param>
|
|
|
public RecipePageEntry(int id1, int id2, int id3, int idBase, int min, int maxBonus)
|
|
public RecipePageEntry(int id1, int id2, int id3, int idBase, int min, int maxBonus)
|
|
|
{
|
|
{
|
|
|
- ItemIdExtension = new int[] { id1, id2, id3 };
|
|
|
|
|
- ItemIdBase = idBase;
|
|
|
|
|
- MinAmount = min;
|
|
|
|
|
- MaxBonusAmount = maxBonus;
|
|
|
|
|
|
|
+ ItemIds = new int[] { id1, id2, id3, idBase };
|
|
|
|
|
+ MinAmounts = new int[] { 1, 1, 1, min };
|
|
|
|
|
+ MaxBonusAmounts = new int[] { 0, 0, 0, maxBonus };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -53,13 +126,27 @@
|
|
|
/// <param name="idBase">The normal item in UltimateFore recipes or the output in other recipes.</param>
|
|
/// <param name="idBase">The normal item in UltimateFore recipes or the output in other recipes.</param>
|
|
|
/// <param name="min">The minimum amount of items created from a recipe.</param>
|
|
/// <param name="min">The minimum amount of items created from a recipe.</param>
|
|
|
/// <param name="maxBonus">The maximum bonus amount of items created from a recipe.</param>
|
|
/// <param name="maxBonus">The maximum bonus amount of items created from a recipe.</param>
|
|
|
- public RecipePageEntry(int id1, int id2, int id3, int idBase, int min = 1, int maxBonus = 0, bool allwaysShowInput = false)
|
|
|
|
|
|
|
+ public RecipePageEntry(int id1, int id2, int id3, int idBase, int min, int maxBonus, bool allwaysShowInput)
|
|
|
{
|
|
{
|
|
|
- ItemIdExtension = new int[] { id1, id2, id3 };
|
|
|
|
|
- ItemIdBase = idBase;
|
|
|
|
|
- MinAmount = min;
|
|
|
|
|
- MaxBonusAmount = maxBonus;
|
|
|
|
|
|
|
+ ItemIds = new int[] { id1, id2, id3, idBase };
|
|
|
|
|
+ MinAmounts = new int[] { 1, 1, 1, min };
|
|
|
|
|
+ MaxBonusAmounts = new int[] { 0, 0, 0, maxBonus };
|
|
|
AllwaysShowInput = allwaysShowInput;
|
|
AllwaysShowInput = allwaysShowInput;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// Use to create a new RecipePageEntry.
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ /// <param name="idIn">The input item id.</param>
|
|
|
|
|
+ /// <param name="idOut1">The first output item id.</param>
|
|
|
|
|
+ /// <param name="idOut2">The second output item id.</param>
|
|
|
|
|
+ /// <param name="idOut3">The third output item id.</param>
|
|
|
|
|
+ public RecipePageEntry(int idIn, int idOut1, int idOut2, int idOut3, int minOut1, int minOut2, int minOut3, int maxBonusOut1, int maxBonusOut2, int maxBonusOut3)
|
|
|
|
|
+ {
|
|
|
|
|
+ ItemIds = new int[] { idIn, idOut1, idOut2, idOut3 };
|
|
|
|
|
+ MinAmounts = new int[] { 1, minOut1, minOut2, minOut3 };
|
|
|
|
|
+ MaxBonusAmounts = new int[] { 0, maxBonusOut1, maxBonusOut2, maxBonusOut3 };
|
|
|
|
|
+ IsReverse = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|