summaryrefslogtreecommitdiff
path: root/src/SMAPI.Toolkit/Framework/ModScanning/ModScanner.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Toolkit/Framework/ModScanning/ModScanner.cs')
-rw-r--r--src/SMAPI.Toolkit/Framework/ModScanning/ModScanner.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/SMAPI.Toolkit/Framework/ModScanning/ModScanner.cs b/src/SMAPI.Toolkit/Framework/ModScanning/ModScanner.cs
index 86a97016..fd206d9d 100644
--- a/src/SMAPI.Toolkit/Framework/ModScanning/ModScanner.cs
+++ b/src/SMAPI.Toolkit/Framework/ModScanning/ModScanner.cs
@@ -177,12 +177,17 @@ namespace StardewModdingAPI.Toolkit.Framework.ModScanning
}
// get mod type
- ModType type = ModType.Invalid;
- if (manifest != null)
+ ModType type;
{
- type = !string.IsNullOrWhiteSpace(manifest.ContentPackFor?.UniqueID)
- ? ModType.ContentPack
- : ModType.Smapi;
+ bool isContentPack = !string.IsNullOrWhiteSpace(manifest?.ContentPackFor?.UniqueID);
+ bool isSmapi = !string.IsNullOrWhiteSpace(manifest?.EntryDll);
+
+ if (isContentPack == isSmapi)
+ type = ModType.Invalid;
+ else if (isContentPack)
+ type = ModType.ContentPack;
+ else
+ type = ModType.Smapi;
}
// build result