diff options
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs b/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs index aafdefc6..c774c038 100644 --- a/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs +++ b/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs @@ -57,11 +57,12 @@ namespace StardewModdingAPI.Framework.ModLoading.Framework /// <returns>Returns whether the module was modified.</returns> public bool RewriteModule() { - return this.Module.GetTypes().AsParallel().WithExecutionMode(ParallelExecutionMode.ForceParallelism).Select(type => + bool anyRewritten = false; + + foreach (TypeDefinition type in this.Module.GetTypes()) { - bool anyRewritten = false; if (type.BaseType == null) - return false; // special type like <Module> + continue; // special type like <Module> anyRewritten |= this.RewriteCustomAttributes(type.CustomAttributes); anyRewritten |= this.RewriteGenericParameters(type.GenericParameters); @@ -107,9 +108,9 @@ namespace StardewModdingAPI.Framework.ModLoading.Framework } } } + } - return anyRewritten; - }).Max(); + return anyRewritten; } |