CaveworldFlora.ClusterPlant_Gleamcap.TrySpawnSporeSpawner C# (CSharp) Method

TrySpawnSporeSpawner() public method

Try to spawn some spores if the plant is mature.
public TrySpawnSporeSpawner ( ) : void
return void
        public void TrySpawnSporeSpawner()
        {
            bool sporeSpawnOccuredLongAgo = (this.lastSporeSpawnTick == 0)
                || ((Find.TickManager.TicksGame - this.lastSporeSpawnTick) > minDelayBetweenSporeSpawnInTicks);

            if ((this.LifeStage == PlantLifeStage.Mature)
                && (this.Dying == false)
                && (this.isInCryostasis == false)
                && sporeSpawnOccuredLongAgo
                && ((Rand.Value < chanceToSpawnSpore)
                || Find.MapConditionManager.ConditionIsActive(MapConditionDefOf.Eclipse)))
            {
                this.lastSporeSpawnTick = Find.TickManager.TicksGame;
                this.sporeSpawner = ThingMaker.MakeThing(Util_CaveworldFlora.gleamcapSporeSpawnerDef) as GleamcapSporeSpawner;
                GenSpawn.Spawn(this.sporeSpawner, this.Position);
                this.sporeSpawner.parent = this;
            }
        }
    }