Exemplo n.º 1
0
        public Stock(StockConfig stockConfig)
        {
            this.BlueFarmAnimals = stockConfig.BlueFarmAnimals;
            this.VoidFarmAnimals = stockConfig.VoidFarmAnimals;

            // Use the lists because the meat indices can't be relied upon (ex. mutton)
            this.FarmAnimalsForPurchase = stockConfig.FarmAnimalsForPurchase;
        }
        private AnimalShop GetAnimalShop(Player player)
        {
            // Set up everything else
            BlueConfig    blueConfig      = new BlueConfig(player.HasSeenEvent(BlueVariation.EVENT_ID));
            BlueVariation blueFarmAnimals = new BlueVariation(blueConfig);

            VoidConfig    voidConfig      = new VoidConfig(this.Config.VoidFarmAnimalsInShop, player.HasCompletedQuest(VoidVariation.QUEST_ID));
            VoidVariation voidFarmAnimals = new VoidVariation(voidConfig);

            List <FarmAnimalForPurchase> farmAnimalsForPurchase = this.Config.GetFarmAnimalsForPurchase(Game1.getFarm());
            StockConfig stockConfig = new StockConfig(farmAnimalsForPurchase, blueFarmAnimals, voidFarmAnimals);
            Stock       stock       = new Stock(stockConfig);

            return(new AnimalShop(stock));
        }
Exemplo n.º 3
0
        private void OnSaveLoaded(object sender, SaveLoadedEventArgs e)
        {
            this.Player = new Player(Game1.player, this.Helper);

            // Set up everything else
            BlueConfig blueConfig = new BlueConfig(this.Player.HasSeenEvent(BlueVariation.EVENT_ID));

            this.BlueFarmAnimals = new BlueVariation(blueConfig);

            VoidConfig voidConfig = new VoidConfig(this.Config.VoidFarmAnimalsInShop, this.Player.HasCompletedQuest(VoidVariation.QUEST_ID));

            this.VoidFarmAnimals = new VoidVariation(voidConfig);

            List <FarmAnimalForPurchase> farmAnimalsForPurchase = this.Config.GetFarmAnimalsForPurchase(Game1.getFarm());
            StockConfig stockConfig = new StockConfig(farmAnimalsForPurchase, this.BlueFarmAnimals, this.VoidFarmAnimals);
            Stock       stock       = new Stock(stockConfig);

            this.AnimalShop = new AnimalShop(stock);
        }
Exemplo n.º 4
0
        /// <param name="version">string</param>
        /// <param name="farm">StardewValley.Farm</param>
        /// <param name="blueFarmAnimals">Paritee.StardewValleyAPI.FarmAnimals.Variations.BlueVariation</param>
        /// <param name="voidFarmAnimals">Paritee.StardewValleyAPI.FarmAnimals.Variations.VoidVariation</param>
        /// <returns>Returns Paritee.StardewValleyAPI.Buidlings.AnimalShop</returns>
        public AnimalShop GetAnimalShop(string version, Farm farm, BlueVariation blueFarmAnimals, VoidVariation voidFarmAnimals)
        {
            if (!this.IsVersionSupported(version))
            {
                throw new NotSupportedException();
            }

            List <FarmAnimalForPurchase> farmAnimalsForPurchase = this.Config.GetFarmAnimalsForPurchase(farm);
            StockConfig stockConfig = new StockConfig(farmAnimalsForPurchase, blueFarmAnimals, voidFarmAnimals);
            Stock       stock       = new Stock(stockConfig);

            return(new AnimalShop(stock));
        }
 public StockConfig(List <FarmAnimalForPurchase> farmAnimalsForPurchase, BlueVariation blueFarmAnimals, VoidVariation voidFarmAnimals)
 {
     this.FarmAnimalsForPurchase = farmAnimalsForPurchase;
     this.BlueFarmAnimals        = blueFarmAnimals;
     this.VoidFarmAnimals        = voidFarmAnimals;
 }