summaryrefslogtreecommitdiff
path: root/src/SMAPI.Toolkit/Framework/ModScanning
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-02-21 23:05:17 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-02-21 23:05:17 -0500
commitdb011ee751bdfb8bbd9abbeb706966db4c4e2461 (patch)
tree4c1ca1c2fb2db41ac0d8b337e2f17209b4ad66f5 /src/SMAPI.Toolkit/Framework/ModScanning
parentf1505b0ebe5c8fa7cf3c160231f0ed7d1bd6619a (diff)
parent9c4c10d2d22cbf67ccadbd35fdf1ffced0541cc2 (diff)
downloadSMAPI-db011ee751bdfb8bbd9abbeb706966db4c4e2461.tar.gz
SMAPI-db011ee751bdfb8bbd9abbeb706966db4c4e2461.tar.bz2
SMAPI-db011ee751bdfb8bbd9abbeb706966db4c4e2461.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Toolkit/Framework/ModScanning')
-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