diff options
Diffstat (limited to 'src/SMAPI')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/ModResolver.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModResolver.cs b/src/SMAPI/Framework/ModLoading/ModResolver.cs index 0b4fe3e9..9db9db99 100644 --- a/src/SMAPI/Framework/ModLoading/ModResolver.cs +++ b/src/SMAPI/Framework/ModLoading/ModResolver.cs @@ -126,7 +126,14 @@ namespace StardewModdingAPI.Framework.ModLoading continue; } - // check for dll if it's supposed to have one + // validate manifest format + if (!ManifestValidator.TryValidateFields(mod.Manifest, out string manifestError)) + { + mod.SetStatus(ModMetadataStatus.Failed, ModFailReason.InvalidManifest, $"its {manifestError}"); + continue; + } + + // check that DLL exists if applicable if (!string.IsNullOrEmpty(mod.Manifest.EntryDll) && validateFilesExist) { IFileLookup pathLookup = getFileLookup(mod.DirectoryPath); @@ -137,13 +144,6 @@ namespace StardewModdingAPI.Framework.ModLoading continue; } } - - // validate manifest - if (!ManifestValidator.TryValidate(mod.Manifest, out string manifestError)) - { - mod.SetStatus(ModMetadataStatus.Failed, ModFailReason.InvalidManifest, $"its {manifestError}"); - continue; - } } // validate IDs are unique |