Minor remapper fixes
This commit is contained in:
parent
6fae190b6e
commit
5e71f13100
@ -286,6 +286,7 @@ public class ReCodeItRemapper
|
||||
}
|
||||
|
||||
// Rename type and all associated type members
|
||||
|
||||
RenameHelper.RenameAll(highestScore);
|
||||
|
||||
Logger.Log("-----------------------------------------------", ConsoleColor.Green);
|
||||
@ -296,10 +297,7 @@ public class ReCodeItRemapper
|
||||
/// </summary>
|
||||
private void WriteAssembly()
|
||||
{
|
||||
var fileName = Path.GetFileName(AssemblyPath);
|
||||
var path = Path.Combine(OutPath, fileName);
|
||||
|
||||
path = DataProvider.WriteAssemblyDefinition(path);
|
||||
var path = DataProvider.WriteAssemblyDefinition(OutPath);
|
||||
|
||||
Logger.Log("-----------------------------------------------", ConsoleColor.Green);
|
||||
Logger.Log($"Complete: Assembly written to `{path}`", ConsoleColor.Green);
|
||||
|
@ -18,8 +18,15 @@ internal static class RenameHelper
|
||||
var types = DataProvider.ModuleDefinition.Types;
|
||||
|
||||
// Rename all fields and properties first
|
||||
if (DataProvider.Settings.Remapper.MappingSettings.RenameFields)
|
||||
{
|
||||
RenameAllFields(score.Definition.Name, score.ReMap.NewTypeName, types);
|
||||
}
|
||||
|
||||
if (DataProvider.Settings.Remapper.MappingSettings.RenameProperties)
|
||||
{
|
||||
RenameAllProperties(score.Definition.Name, score.ReMap.NewTypeName, types);
|
||||
}
|
||||
|
||||
if (!direct)
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Mono.Cecil;
|
||||
using Mono.Cecil.Rocks;
|
||||
using ReCodeIt.Enums;
|
||||
using ReCodeIt.Models;
|
||||
using ReCodeIt.Utils;
|
||||
@ -15,8 +14,8 @@ internal static class TypeDefExtensions
|
||||
return EMatchResult.Disabled;
|
||||
}
|
||||
|
||||
// Interfaces cannot be abstract, and abstract cannot be static
|
||||
if (type.IsInterface || type.GetStaticConstructor() is not null)
|
||||
// Interfaces cannot be abstract
|
||||
if (type.IsInterface)
|
||||
{
|
||||
score.FailureReason = EFailureReason.IsAbstract;
|
||||
return EMatchResult.NoMatch;
|
||||
|
Loading…
x
Reference in New Issue
Block a user