示例#1
0
 /// <summary>Forces the fruit tree move process for the given upgrade level.</summary>
 /// <param name="command">The name of the command invoked</param>
 /// <param name="args">The arguments received by the command. Each word after the command name is a separate argument.</param>
 private void DoMoveTrees(string command, string[] args)
 {
     if (Context.IsWorldReady)
     {
         FruitTreeMover.Upgraded();
         FruitTreeMover.MoveTrees(int.Parse(args[0]));
         Monitor.Log($"Trees moved as if greenhouse upgrade {args[0]} has been completed now.", LogLevel.Info);
     }
 }
示例#2
0
        /// <summary>The event called when a new day begins.</summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event arguments.</param>
        private void OnDayStarted(object sender, DayStartedEventArgs e)
        {
            var greenhouse   = Game1.getFarm().buildings.OfType <GreenhouseBuilding>().FirstOrDefault();
            int currentLevel = GetUpgradeLevel(greenhouse);

            FruitTreeMover.MoveTrees(currentLevel);

            if (currentLevel == 2)
            {
                this.WaterGreenhouse();
            }
        }