public static void BushPerformUseAction_postfix(Vector2 tileLocation, Bush __instance)
 {
     //not implemented yet
     if (__instance.inBloom(Game1.currentSeason, Game1.dayOfMonth) && __instance.size.Value == Bush.greenTeaBush)
     {
         MultiYieldCrop.MultiYieldCrops.instance.SpawnHarvest(tileLocation, "Tea Leaves", HoeDirt.noFertilizer);
     }
 }
Пример #2
0
        private static bool IsBushFruited(Bush bush)
        {
            if (IsBerryBush(bush) || IsTeaBush(bush))
            {
                return(bush.tileSheetOffset.Value == 1 && bush.inBloom(Game1.currentSeason, Game1.dayOfMonth));
            }

            return(false);
        }
 private bool IsForageableBush(TerrainFeature feature, out Bush bush)
 {
     // impl @ StardewValley::Bush::shake
     bush = null;
     if (feature is Bush outBush)
     {
         bush = outBush;
         return(!bush.townBush.Value && bush.tileSheetOffset.Value == 1 && bush.inBloom(Game1.GetSeasonForLocation(Location), Game1.dayOfMonth));
     }
     return(false);
 }
Пример #4
0
        /// <summary>Get the data to display for this subject.</summary>
        /// <param name="metadata">Provides metadata that's not available from the game data directly.</param>
        public override IEnumerable <IDebugField> GetDebugFields(Metadata metadata)
        {
            Bush target = this.Target;

            // pinned fields
            yield return(new GenericDebugField("health", target.health, pinned: true));

            yield return(new GenericDebugField("is town bush", this.Stringify(target.townBush.Value), pinned: true));

            yield return(new GenericDebugField("is in bloom", this.Stringify(target.inBloom(Game1.currentSeason, Game1.dayOfMonth)), pinned: true));

            // raw fields
            foreach (IDebugField field in this.GetDebugFieldsFrom(target))
            {
                yield return(field);
            }
        }
 public static bool IsHarvestableBush(Bush bush)
 {
     return(bush != null && !bush.townBush && bush.inBloom(Game1.GetSeasonForLocation(bush.currentLocation), Game1.dayOfMonth) && bush.size.Value != Bush.greenTeaBush && bush.size.Value != Bush.walnutBush);
 }