Example #1
0
        /// <summary>End the crop.</summary>
        public void EndCrop()
        {
            Summary.WriteMessage(this, "Crop ending");

            // Invoke a plant ending event.
            if (PlantEnding != null)
            {
                PlantEnding.Invoke(this, new EventArgs());
            }

            Clear();
            cultivarDefinition.Unapply();
        }
Example #2
0
        /// <summary>End the crop.</summary>
        public void EndCrop()
        {
            if (IsAlive == false)
            {
                throw new Exception("EndCrop method called when no crop is planted.  Either your planting rule is not working or your end crop is happening at the wrong time");
            }
            summary.WriteMessage(this, "Crop ending");

            // Invoke a plant ending event.
            if (PlantEnding != null)
            {
                PlantEnding.Invoke(this, new EventArgs());
            }

            Clear();
            IsEnding = true;
            IsAlive  = false;
        }