add 1.6 support and fix prepatch regressions

This commit is contained in:
localavaster
2026-04-07 03:56:12 -06:00
parent a99972001e
commit c020968638
32 changed files with 609 additions and 158 deletions
+6 -3
View File
@@ -17,7 +17,8 @@ public sealed class ModsConfigPatches : ClassWithFishPrepatches
= "Fixes a MayRequire bug causing it to normally not recognize steam versions of mods if another local "
+ "copy exists.";
public override MethodBase TargetMethodBase { get; } = methodof(ModsConfig.AreAllActive);
public override MethodBase TargetMethodBase { get; }
= AccessTools.DeclaredMethod(typeof(ModsConfig), nameof(ModsConfig.AreAllActive), [typeof(string)])!;
public override void Transpiler(ILProcessor ilProcessor, ModuleDefinition module)
=> IsActiveFix(ilProcessor, module);
@@ -29,7 +30,9 @@ public sealed class ModsConfigPatches : ClassWithFishPrepatches
= "Fixes a MayRequireAnyOf bug causing it to normally not recognize steam versions of mods if another "
+ "local copy exists, as well as its inability to strip whitespace.";
public override MethodBase TargetMethodBase { get; } = methodof(ModsConfig.IsAnyActiveOrEmpty);
public override MethodBase TargetMethodBase { get; }
= AccessTools.DeclaredMethod(typeof(ModsConfig), nameof(ModsConfig.IsAnyActiveOrEmpty),
[typeof(IEnumerable<string>), typeof(bool)])!;
public override void Transpiler(ILProcessor ilProcessor, ModuleDefinition module)
=> IsActiveFix(ilProcessor, module);
@@ -59,4 +62,4 @@ public sealed class ModsConfigPatches : ClassWithFishPrepatches
}
public static bool IsActiveReplacement(string id) => ModLister.GetActiveModWithIdentifier(id, true) != null;
}
}