Ejemplo n.º 1
0
        private void populateFarmBlueprints()
        {
            blueprints.Clear();
            currentFarm = (currentFarmIndex == 0) ? Game1.getFarm() : FarmExpansionSMAPI.getFarmExtension();

            blueprints.Add(new BluePrint("Coop"));
            blueprints.Add(new BluePrint("Barn"));
            blueprints.Add(new BluePrint("Well"));
            blueprints.Add(new BluePrint("Silo"));
            if (!Game1.getFarm().isBuildingConstructed("Stable"))
            {
                blueprints.Add(new BluePrint("Stable"));
            }
            blueprints.Add(new BluePrint("Slime Hutch"));
            if (currentFarm.isBuildingConstructed("Coop"))
            {
                blueprints.Add(new BluePrint("Big Coop"));
            }
            if (currentFarm.isBuildingConstructed("Big Coop"))
            {
                blueprints.Add(new BluePrint("Deluxe Coop"));
            }
            if (currentFarm.isBuildingConstructed("Barn"))
            {
                blueprints.Add(new BluePrint("Big Barn"));
            }
            if (currentFarm.isBuildingConstructed("Big Barn"))
            {
                blueprints.Add(new BluePrint("Deluxe Barn"));
            }
        }
Ejemplo n.º 2
0
        private void populateAnimalStock()
        {
            animalsToPurchase.Clear();
            currentFarm = (currentFarmIndex == 0) ? Game1.getFarm() : FarmExpansionSMAPI.getFarmExtension();
            List <StardewValley.Object> stock = getPurchaseAnimalStock();

            for (int i = 0; i < stock.Count(); i++)
            {
                animalsToPurchase.Add(new ClickableTextureComponent(new Microsoft.Xna.Framework.Rectangle(xPositionOnScreen + borderWidth + i % 3 * Game1.tileSize * 2, yPositionOnScreen + spaceToClearTopBorder + borderWidth / 2 + i / 3 * (Game1.tileSize + Game1.tileSize / 3), Game1.tileSize * 2, Game1.tileSize), string.Concat(stock[i].salePrice()), stock[i].Name, Game1.mouseCursors, new Microsoft.Xna.Framework.Rectangle(i % 3 * 16 * 2, 448 + i / 3 * 16, 32, 16), 4f, false, stock[i].type == null)
                {
                    item = stock[i]
                });
            }
        }