Esempio n. 1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="StockEntry" /> class.
        /// </summary>
        /// <param name="owner">
        ///     The mod that has requested this stock entry.
        /// </param>
        /// <param name="stockType">
        ///     The stock type.
        /// </param>
        /// <param name="id">
        ///     The id.
        /// </param>
        /// <param name="checkDelegate">
        ///     The check delegate.
        /// </param>
        /// <param name="price">
        ///     The price.
        /// </param>
        /// <param name="stock">
        ///     The stock.
        /// </param>
        public StockEntry(
            Mod owner,
            StockType stockType,
            int id,
            ShopUtilities.CheckIfAddShopStock checkDelegate,
            int price = 0,
            int stock = ShopUtilities.Infinite)
        {
            this.Owner = owner;

            if (stockType == StockType.Item)
            {
                this.ItemId = id;
            }
            else if (stockType == StockType.BigCraftable)
            {
                this.BigCraftableId = id;
            }
            else
            {
                this.ItemId = id;
            }

            this.CheckDelegate = checkDelegate;
            this.Price         = price;
            this.Stock         = stock;
        }
 public StockEntry(Mod owner, BigCraftableInformation bigCraftableInformation, ShopUtilities.CheckIfAddShopStock checkDelegate, int price = 0, int stock = ShopUtilities.Infinite)
 {
     Owner = owner;
     BigCraftableInformation = bigCraftableInformation;
     CheckDelegate           = checkDelegate;
     Price = price;
     Stock = stock;
 }
Esempio n. 3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="StockEntry" /> class.
 /// </summary>
 /// <param name="owner">
 ///     The mod that has requested this stock entry.
 /// </param>
 /// <param name="itemInformation">
 ///     The item information.
 /// </param>
 /// <param name="checkDelegate">
 ///     The check delegate.
 /// </param>
 /// <param name="price">
 ///     The price.
 /// </param>
 /// <param name="stock">
 ///     The stock.
 /// </param>
 public StockEntry(
     Mod owner,
     ItemInformation itemInformation,
     ShopUtilities.CheckIfAddShopStock checkDelegate,
     int price = 0,
     int stock = ShopUtilities.Infinite)
 {
     this.Owner           = owner;
     this.ItemInformation = itemInformation;
     this.CheckDelegate   = checkDelegate;
     this.Price           = price;
     this.Stock           = stock;
 }
        public StockEntry(Mod owner, StockType stockType, int Id, ShopUtilities.CheckIfAddShopStock checkDelegate, int price = 0, int stock = ShopUtilities.Infinite)
        {
            Owner = owner;

            if (stockType == StockType.Item)
            {
                ItemId = Id;
            }
            else if (stockType == StockType.BigCraftable)
            {
                BigCraftableId = Id;
            }
            else
            {
                ItemId = Id;
            }

            CheckDelegate = checkDelegate;
            Price         = price;
            Stock         = stock;
        }