mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fall back to file name before validating also dont call migrate twice
This commit is contained in:
parent
9408fd43f8
commit
c189482f67
8
NewHorizons/External/NewHorizonBody.cs
vendored
8
NewHorizons/External/NewHorizonBody.cs
vendored
@ -16,14 +16,6 @@ namespace NewHorizons.External
|
|||||||
Config = config;
|
Config = config;
|
||||||
Mod = mod;
|
Mod = mod;
|
||||||
RelativePath = relativePath;
|
RelativePath = relativePath;
|
||||||
|
|
||||||
// Fall back to file name if name not given
|
|
||||||
if (!string.IsNullOrEmpty(relativePath) && string.IsNullOrEmpty(config.name))
|
|
||||||
{
|
|
||||||
config.name = Path.GetFileNameWithoutExtension(relativePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
Migrate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlanetConfig Config;
|
public PlanetConfig Config;
|
||||||
|
|||||||
@ -922,6 +922,12 @@ namespace NewHorizons
|
|||||||
BodyDict.Add(config.starSystem, new List<NewHorizonsBody>());
|
BodyDict.Add(config.starSystem, new List<NewHorizonsBody>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fall back to file name if name not given
|
||||||
|
if (!string.IsNullOrEmpty(relativePath) && string.IsNullOrEmpty(config.name))
|
||||||
|
{
|
||||||
|
config.name = Path.GetFileNameWithoutExtension(relativePath);
|
||||||
|
}
|
||||||
|
|
||||||
// Has to happen after we make sure theres a system config
|
// Has to happen after we make sure theres a system config
|
||||||
config.Validate();
|
config.Validate();
|
||||||
config.Migrate();
|
config.Migrate();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user