Merge branch 'develop' into harmony2

# Conflicts:
#	src/SMAPI/SMAPI.csproj
This commit is contained in:
ZaneYork 2020-06-02 18:54:27 +08:00
commit 91415cbb5b
2 changed files with 6 additions and 6 deletions

View File

@ -7,6 +7,7 @@
* MacOS files starting with `._` are now ignored and can no longer cause skipped mods.
* Simplified paranoid warning logs and reduced their log level.
* Fixed `BadImageFormatException` error detection.
* Fixed black maps on Android for mods which use `.tmx` files.
* For the web UI:
* Added GitHub licenses to mod compatibility list.

View File

@ -57,12 +57,11 @@ namespace StardewModdingAPI.Framework.ModLoading.Framework
/// <returns>Returns whether the module was modified.</returns>
public bool RewriteModule()
{
bool anyRewritten = false;
foreach (TypeDefinition type in this.Module.GetTypes())
return this.Module.GetTypes().AsParallel().WithExecutionMode(ParallelExecutionMode.ForceParallelism).Select(type =>
{
bool anyRewritten = false;
if (type.BaseType == null)
continue; // special type like <Module>
return false; // special type like <Module>
anyRewritten |= this.RewriteCustomAttributes(type.CustomAttributes);
anyRewritten |= this.RewriteGenericParameters(type.GenericParameters);
@ -108,9 +107,9 @@ namespace StardewModdingAPI.Framework.ModLoading.Framework
}
}
}
}
return anyRewritten;
return anyRewritten;
}).Max();
}