Exemplo n.º 1
0
 public BundleReward(BundleTask Task, int Id, int Quantity, BundleRewardType Type)
 {
     this.Task       = Task;
     this.Id         = Id;
     this.Quantity   = Quantity;
     this.RewardType = Type;
 }
Exemplo n.º 2
0
 public BundleItem(BundleTask Task, int Id, int Quantity, ObjectQuality MinQuality, bool IsCompleted)
 {
     this.Task        = Task;
     this.Id          = Id;
     this.Quantity    = Quantity;
     this.MinQuality  = MinQuality;
     this.IsCompleted = IsCompleted;
 }
Exemplo n.º 3
0
        /// <param name="RawData">The raw data string from the game's bundle content. EX: "16 1 0".<para/>
        /// This format is described here: <see cref="https://stardewvalleywiki.com/Modding:Bundles"/></param>
        public BundleItem(BundleTask Task, string RawData)
        {
            this.Task = Task;
            List <string> Entries = RawData.Split(' ').ToList();

            this.Id          = int.Parse(Entries[0]);
            this.Quantity    = int.Parse(Entries[1]);
            this.MinQuality  = (ObjectQuality)int.Parse(Entries[2]);
            this.IsCompleted = false;
        }
Exemplo n.º 4
0
        /// <param name="RawData">The raw data string from the game's bundle content. EX: "O 495 30".<para/>
        /// This format is described here: <see cref="https://stardewvalleywiki.com/Modding:Bundles"/></param>
        public BundleReward(BundleTask Task, string RawData)
        {
            this.Task = Task;

            List <string> Entries = RawData.Split(' ').ToList();

            if (Entries[0].Equals("O", StringComparison.CurrentCultureIgnoreCase))
            {
                this.RewardType = BundleRewardType.Object;
            }
            else if (Entries[0].Equals("BO", StringComparison.CurrentCultureIgnoreCase))
            {
                this.RewardType = BundleRewardType.BigCraftable;
            }
            else if (Entries[0].Equals("R", StringComparison.CurrentCultureIgnoreCase))
            {
                this.RewardType = BundleRewardType.Ring;
            }
            else if (Entries[0].Equals("W", StringComparison.CurrentCultureIgnoreCase))
            {
                this.RewardType = BundleRewardType.Weapon;
            }
            else if (Entries[0].Equals("H", StringComparison.CurrentCultureIgnoreCase))
            {
                this.RewardType = BundleRewardType.Hat;
            }
            else if (Entries[0].Equals("C", StringComparison.CurrentCultureIgnoreCase))
            {
                this.RewardType = BundleRewardType.Clothing;
            }
            else if (Entries[0].Equals("F", StringComparison.CurrentCultureIgnoreCase))
            {
                this.RewardType = BundleRewardType.Furniture;
            }
            else
            {
                throw new NotImplementedException(string.Format("Unrecognized Bundle Reward Type: {0}", Entries[0]));
            }

            this.Id       = int.Parse(Entries[1]);
            this.Quantity = int.Parse(Entries[2]);
        }