public static void Postfix(ref TerrainDef __result, IntVec3 c, Map map) { BiomeDef biome = map.Biome; // General cell terrain replcement ModExt_Biome_Replacement extReplacement = biome.GetModExtension <ModExt_Biome_Replacement>() ?? ModExt_Biome_Replacement.Default; // Replace sand (mostly from beach) if (__result == RimWorld.TerrainDefOf.Sand) { __result = extReplacement.sandReplacement; } // Replace gravel if (__result == RimWorld.TerrainDefOf.Gravel) { __result = extReplacement.gravelReplacement; } // Addtitional island terrainPatchMaker by fertility if (biome.HasModExtension <ModExt_Biome_GenStep_Islands>()) { TerrainDef newTerrain = IslandNoises.TerrainAtFromTerrainPatchMakerByFertility(c, map, __result); if (newTerrain != null) { __result = newTerrain; } } // Post-terrain-gen terrain replacement // Replace filler stone if (__result == TerrainDefOf.FillerStone) { __result = GenStep_RocksFromGrid.RockDefAt(c).building.naturalTerrain; } }
public override void Generate(Map map, GenStepParams parms) { BiomeDef biome = map.Biome; // Add GenStep Spikes if (biome.HasModExtension <ModExt_Biome_GenStep_Spikes>()) { SpikeNoises.WorkOnMapGenerator(map); } // Add GenStep Islands if (biome.HasModExtension <ModExt_Biome_GenStep_Islands>()) { IslandNoises.WorkOnMapGenerator(map); } // Add GenStep Ravine if (biome.HasModExtension <ModExt_Biome_GenStep_Ravine>()) { RavineNoises.WorkOnMapGenerator(map); } }
// Token: 0x06000053 RID: 83 RVA: 0x00005F24 File Offset: 0x00004124 public static string GetCamoDefBiome(BiomeDef biome) { if (biome.HasModExtension <CompCamoDefs>()) { string text = biome?.GetModExtension <CompCamoDefs>().CamoType; if (CamoGearUtility.CamoTypes().Contains(text)) { return(text); } } return("notDefined"); }
public static float GetMaxFertByBiome(BiomeDef biome) { if (!biome.HasModExtension <BiomesMap>()) { return(1.2f); } if (biome.GetModExtension <BiomesMap>().isOasis) { return(17f); } if (biome.GetModExtension <BiomesMap>().isIsland) { return(17f); } return(1.2f); }