Added ability to import and export town/city settings
This commit is contained in:
+10
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user