コード例 #1
0
        /// <summary>Removes biomass from root layers when harvest, graze or cut events are called.</summary>
        /// <param name="biomassRemoveType">Name of event that triggered this biomass remove call.</param>
        /// <param name="biomassToRemove">The fractions of biomass to remove</param>
        public void RemoveBiomass(string biomassRemoveType, OrganBiomassRemovalType biomassToRemove)
        {
            // Remove live tissue
            Live.RemoveBiomass(biomassToRemove.FractionLiveToRemove, biomassToRemove.FractionLiveToResidue);

            // Remove dead tissue
            Dead.RemoveBiomass(biomassToRemove.FractionDeadToRemove, biomassToRemove.FractionDeadToResidue);

            if (biomassRemoveType != "Harvest" || biomassRemoveType != "Cut")
            {
                IsKLModiferDueToDamageActive = true;
            }
        }
コード例 #2
0
        /// <summary>Removes biomass from root layers when harvest, graze or cut events are called.</summary>
        /// <param name="biomassRemoveType">Name of event that triggered this biomass remove call.</param>
        /// <param name="biomassToRemove">The fractions of biomass to remove</param>
        public void RemoveBiomass(string biomassRemoveType, OrganBiomassRemovalType biomassToRemove)
        {
            // Live removal
            Live.RemoveBiomass(biomassToRemove.FractionLiveToRemove, sendToSoil: false);
            Live.RemoveBiomass(biomassToRemove.FractionLiveToResidue, sendToSoil: true);

            // Dead removal
            Dead.RemoveBiomass(biomassToRemove.FractionDeadToRemove, sendToSoil: false);
            Dead.RemoveBiomass(biomassToRemove.FractionDeadToResidue, sendToSoil: true);

            if (biomassRemoveType != "Harvest")
            {
                IsKLModiferDueToDamageActive = true;
            }
        }
コード例 #3
0
 /// <summary>User is ending the pasture.</summary>
 public void DoEndCrop()
 {
     Live.RemoveBiomass(1, true);
     Dead.RemoveBiomass(1, true);
 }