diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-11-10 23:27:38 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-11-10 23:27:38 -0500 |
commit | 867afdd96ff8896dc81fdab204cf045713d32d91 (patch) | |
tree | 012e7503eb7179111c134bf15875598c939d93e9 /src/SMAPI/Framework | |
parent | 6ee0d2f93d5d06556915f41e29621c59d9e9e551 (diff) | |
download | SMAPI-867afdd96ff8896dc81fdab204cf045713d32d91.tar.gz SMAPI-867afdd96ff8896dc81fdab204cf045713d32d91.tar.bz2 SMAPI-867afdd96ff8896dc81fdab204cf045713d32d91.zip |
tweak new code
Diffstat (limited to 'src/SMAPI/Framework')
-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 |