diff --git a/engine/src/modules/climate/climate_base.gd b/engine/src/modules/climate/climate_base.gd index b0b4dddd..191dfb2f 100644 --- a/engine/src/modules/climate/climate_base.gd +++ b/engine/src/modules/climate/climate_base.gd @@ -230,7 +230,29 @@ func _check_terrain_evolution(game_map: RefCounted) -> void: if tile.is_natural_wonder: continue - if tid == "ocean" or tid == "coast" or tid == "lake" or tid == "volcano": + + # Water freezing/thawing + var freeze_temp: float = _params.get("water_freeze_threshold", 0.12) + var thaw_temp: float = freeze_temp + 0.03 + var is_water: bool = ( + tid == "ocean" or tid == "coast" or tid == "lake" or tid == "inland_sea" + ) + if is_water: + if tile.temperature < freeze_temp: + tile.original_biome_id = tid + tile.biome_id = "ice" + tile.quality = 1 + tile.quality_progress = 0 + continue + if tid == "ice": + if tile.temperature > thaw_temp and tile.original_biome_id != "": + tile.biome_id = tile.original_biome_id + tile.original_biome_id = "" + tile.quality = 1 + tile.quality_progress = 0 + continue + + if tid == "volcano": continue var ideal: String = _ideal_terrain(tile)