| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- using System;
- namespace RecipeMenuCore.API
- {
- public class RecipePageEntry
- {
- /// <summary>
- /// The ultimate items in UltimateFore recipes or the inputs in other recipes.
- /// </summary>
- [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>
- /// The normal item in UltimateFore recipes or the output in other recipes.
- /// </summary>
- [Obsolete]
- public int ItemIdBase
- {
- get
- {
- if (ItemIds != null && ItemIds.Length == 4)
- return ItemIds[3];
- return 0;
- }
- }
- /// <summary>
- /// The MinAmount of items created from a recipe.
- /// </summary>
- [Obsolete]
- public int MinAmount
- {
- get
- {
- if (MinAmounts != null && MinAmounts.Length == 4)
- return MinAmounts[3];
- return 1;
- }
- }
- /// <summary>
- /// The MaxBonusAmount to be added to the base value.
- /// </summary>
- [Obsolete]
- public int MaxBonusAmount
- {
- get
- {
- if (MaxBonusAmounts != null && MaxBonusAmounts.Length == 4)
- return MaxBonusAmounts[3];
- return 0;
- }
- }
- /// <summary>
- /// Should the input be visible, if the craft has never been done before.
- /// </summary>
- 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>
- /// 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>
- /// <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>
- 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 };
- }
- /// <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>
- /// <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>
- 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;
- }
- /// <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;
- }
- }
- }
|