added multiple lake shapes

This commit is contained in:
Grimsace
2026-02-19 10:29:17 -06:00
parent d3315656f6
commit 7a4cd749c1
3 changed files with 110 additions and 14 deletions
+6
View File
@@ -20,6 +20,7 @@ type Settings struct {
LakeSizeLower float64 `json:"lake_size_lower"`
LakeSizeUpper float64 `json:"lake_size_upper"`
LakeEdgeRoughness float64 `json:"lake_edge_roughness"`
LakeShape string `json:"lake_shape"`
Rivers int `json:"rivers"`
MinRiverWidth float64 `json:"min_river_width"`
MaxRiverWidth float64 `json:"max_river_width"`
@@ -117,6 +118,7 @@ func LoadSettings() (*Settings, error) {
LakeSizeLower: 1,
LakeSizeUpper: 5,
LakeEdgeRoughness: 50,
LakeShape: "circle",
MinTreeSize: 5,
MaxTreeSize: 20,
TreeCoverage: 20,
@@ -162,6 +164,10 @@ func LoadSettings() (*Settings, error) {
return nil, err
}
if settings.LakeShape == "" {
settings.LakeShape = "circle"
}
// Ensure BuildingShapeRatios is initialized
if settings.BuildingShapeRatios == nil {
settings.BuildingShapeRatios = map[string]float64{