Ejemplo n.º 1
0
        private StardewValley.Object GetHarvestedTeaLeaf(Bush bush)
        {
            // create tea leaf
            StardewValley.Object teaLeaf = new StardewValley.Object(815, 1);

            // change green tea bush state to harvested
            this.Helper.Reflection.GetField <float>(bush, "maxShake").SetValue((float)Math.PI / 128f);
            bush.tileSheetOffset.Value = 0;
            bush.setUpSourceRect();

            return(teaLeaf);
        }
 internal static Bush PrepareBushForPlacement(Bush bush, Vector2 tileLocation)
 {
     if (!Game1.player.currentLocation.IsOutdoors && !bush.greenhouseBush.Value)
     {
         bush.greenhouseBush.Value = true;
     }
     else if (Game1.player.currentLocation.IsOutdoors && bush.greenhouseBush.Value)
     {
         bush.greenhouseBush.Value = false;
     }
     bush.tilePosition.Value  = tileLocation;
     bush.currentTileLocation = tileLocation;
     bush.currentLocation     = Game1.currentLocation;
     ShakeBush(bush, tileLocation);
     bush.loadSprite();
     bush.tileSheetOffset.Value = 0;
     bush.setUpSourceRect();
     return(bush);
 }