using System; namespace RecipeMenuCore.API { public class RecipePageEntry { /// /// The ultimate items in UltimateFore recipes or the inputs in other recipes. /// [Obsolete] public int[] ItemIdExtension { get { if (ItemIds != null && ItemIds.Length == 4) return new int[] { ItemIds[0], ItemIds[1], ItemIds[2] }; return new int[3]; } } /// /// The normal item in UltimateFore recipes or the output in other recipes. /// [Obsolete] public int ItemIdBase { get { if (ItemIds != null && ItemIds.Length == 4) return ItemIds[3]; return 0; } } /// /// The MinAmount of items created from a recipe. /// [Obsolete] public int MinAmount { get { if (MinAmounts != null && MinAmounts.Length == 4) return MinAmounts[3]; return 1; } } /// /// The MaxBonusAmount to be added to the base value. /// [Obsolete] public int MaxBonusAmount { get { if (MaxBonusAmounts != null && MaxBonusAmounts.Length == 4) return MaxBonusAmounts[3]; return 0; } } /// /// Should the input be visible, if the craft has never been done before. /// public bool AllwaysShowInput { get; protected set; } /// /// All 4 items used in the recipe. /// public int[] ItemIds { get; protected set; } /// /// The Minimum amount of items required or created of each of the 4 items. /// public int[] MinAmounts { get; protected set; } /// /// The MaxBonusAmount to be added to the base value (output only). /// public int[] MaxBonusAmounts { get; protected set; } /// /// States if the recipe is a 3 to 1 or a 1 to 3 items recipe. /// public bool IsReverse { get; protected set; } /// /// Use to create a new RecipePageEntry. /// /// The first ultimate item in UltimateFore recipes or the first input in other recipes. /// The second ultimate item in UltimateFore recipes or the second input in other recipes. /// The third ultimate item in UltimateFore recipes or the third input in other recipes. /// The normal item in UltimateFore recipes or the output in other recipes. 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; } /// /// Use to create a new RecipePageEntry. /// /// The first ultimate item in UltimateFore recipes or the first input in other recipes. /// The second ultimate item in UltimateFore recipes or the second input in other recipes. /// The third ultimate item in UltimateFore recipes or the third input in other recipes. /// The normal item in UltimateFore recipes or the output in other recipes. /// The minimum amount of items created from a recipe. /// The maximum bonus amount of items created from a recipe. public RecipePageEntry(int id1, int id2, int id3, int idBase, int min, int maxBonus) { ItemIds = new int[] { id1, id2, id3, idBase }; MinAmounts = new int[] { 1, 1, 1, min }; MaxBonusAmounts = new int[] { 0, 0, 0, maxBonus }; } /// /// Use to create a new RecipePageEntry. /// /// The first ultimate item in UltimateFore recipes or the first input in other recipes. /// The second ultimate item in UltimateFore recipes or the second input in other recipes. /// The third ultimate item in UltimateFore recipes or the third input in other recipes. /// The normal item in UltimateFore recipes or the output in other recipes. /// The minimum amount of items created from a recipe. /// The maximum bonus amount of items created from a recipe. public RecipePageEntry(int id1, int id2, int id3, int idBase, int min, int maxBonus, bool allwaysShowInput) { ItemIds = new int[] { id1, id2, id3, idBase }; MinAmounts = new int[] { 1, 1, 1, min }; MaxBonusAmounts = new int[] { 0, 0, 0, maxBonus }; AllwaysShowInput = allwaysShowInput; } /// /// Use to create a new RecipePageEntry. /// /// The input item id. /// The first output item id. /// The second output item id. /// The third output item id. 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; } } }