Added ability to import and export town/city settings

This commit is contained in:
grimsace
2026-03-11 13:08:40 -05:00
parent e9a7313a97
commit 51039399ec
2 changed files with 214 additions and 2 deletions
+10 -2
View File
@@ -196,6 +196,16 @@ func LoadSettings() (*Settings, error) {
return nil, err
}
normalizeSettings(&settings, rawKeys)
return &settings, nil
}
func normalizeSettings(settings *Settings, rawKeys map[string]json.RawMessage) {
if rawKeys == nil {
rawKeys = map[string]json.RawMessage{}
}
if settings.LakeShape == "" {
settings.LakeShape = "circle"
}
@@ -322,6 +332,4 @@ func LoadSettings() (*Settings, error) {
}
settings.LastExportPath = homeDir
}
return &settings, nil
}