public override void SpawnSetup() { base.SpawnSetup(); if (reproducer == null && def.plant.seedEmitAveragePer20kTicks > 0) { reproducer = new PlantReproducer(this); } //At mapgen, we set your age randomly //Note: this can lead to inconsistent states e.g. 10% growth and rotting if (Find.Map.generating && def.plant.LimitedLifespan) { age = Random.Range(0, (def.plant.lifeSpan + 3000)); } //Store all the position indices for (int i = 0; i < def.plant.maxMeshCount; i++) { posIndexList.Add(i); } posIndexList.Shuffle(); }
public override void SpawnSetup() { base.SpawnSetup(); if( reproducer == null && def.plant.seedEmitAveragePer20kTicks > 0 ) { reproducer = new PlantReproducer(this); } //At mapgen, we set your age randomly //Note: this can lead to inconsistent states e.g. 10% growth and rotting if( Find.Map.generating && def.plant.LimitedLifespan ) age = Random.Range( 0, (def.plant.lifeSpan + 3000)); //Store all the position indices for( int i=0; i<def.plant.maxMeshCount; i++ ) posIndexList.Add(i); posIndexList.Shuffle(); }