// New cluster initialization. public static ClusterPlant SpawnNewClusterAt(Map map, IntVec3 spawnCell, ThingDef_ClusterPlant plantDef, int desiredSize) { ClusterPlant newPlant = ThingMaker.MakeThing(plantDef) as ClusterPlant; GenSpawn.Spawn(newPlant, spawnCell, map); Cluster newCluster = ThingMaker.MakeThing(Util_CaveworldFlora.ClusterDef) as Cluster; newCluster.Initialize(plantDef, desiredSize); GenSpawn.Spawn(newCluster, spawnCell, map); newPlant.cluster = newCluster; return(newPlant); }