Browse Source

Bumped version

Added anti-yeet patch hidden behind config option
pull/46/head
Anairkoen Schno 5 years ago
parent
commit
b1e62bb990
6 changed files with 42 additions and 11 deletions
  1. +3
    -0
      IPA.Injector/IPA.Injector.csproj
  2. +33
    -7
      IPA.Injector/Injector.cs
  3. +3
    -1
      IPA.Loader/Config/SelfConfig.cs
  4. +1
    -1
      IPA.Loader/Loader/manifest.json
  5. +2
    -2
      IPA/Properties/AssemblyInfo.cs
  6. BIN
      Refs/UnityEngine.CoreModule.dll

+ 3
- 0
IPA.Injector/IPA.Injector.csproj View File

@ -90,6 +90,9 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mono.Cecil">
<Version>0.10.3</Version>
</PackageReference>
<PackageReference Include="SemanticVersioning">
<Version>1.2.0</Version>
</PackageReference>


+ 33
- 7
IPA.Injector/Injector.cs View File

@ -177,23 +177,49 @@ namespace IPA.Injector
bkp?.Add(unityPath);
unityAsmDef.Write(unityPath);
}
else
return; // shortcut
}
#endregion Insert patch into UnityEngine.CoreModule.dll
loader.Debug("Ensuring Assembly-CSharp is virtualized");
#region Virtualize Assembly-CSharp.dll
{
var ascPath = Path.Combine(Environment.CurrentDirectory, "Beat Saber_Data", "Managed",
"Assembly-CSharp.dll");
var ascModule = VirtualizedModule.Load(ascPath);
ascModule.Virtualize(cAsmName, () => bkp?.Add(ascPath));
}
#region Virtualize Assembly-CSharp.dll
{
var ascModule = VirtualizedModule.Load(ascPath);
ascModule.Virtualize(cAsmName, () => bkp?.Add(ascPath));
}
#endregion Virtualize Assembly-CSharp.dll
#region Anti-Yeet
#endregion Virtualize Assembly-CSharp.dll
if (SelfConfig.SelfConfigRef.Value.ApplyAntiYeet)
{
loader.Debug("Applying anti-yeet patch");
var ascAsmDef = AssemblyDefinition.ReadAssembly(ascPath, new ReaderParameters
{
ReadWrite = false,
InMemory = true,
ReadingMode = ReadingMode.Immediate
});
var ascModDef = ascAsmDef.MainModule;
var deleter = ascModDef.GetType("IPAPluginsDirDeleter");
deleter.Methods.Clear(); // delete all methods
ascAsmDef.Write(ascPath);
}
#endregion
}
}
private static bool bootstrapped;


+ 3
- 1
IPA.Loader/Config/SelfConfig.cs View File

@ -33,10 +33,12 @@ namespace IPA.Config
}
internal const string IPAName = "Beat Saber IPA";
internal const string IPAVersion = "3.12.6";
internal const string IPAVersion = "3.12.7";
public bool Regenerate = true;
public bool ApplyAntiYeet = false;
public class DebugObject
{
public bool ShowCallSource = false;


+ 1
- 1
IPA.Loader/Loader/manifest.json View File

@ -5,7 +5,7 @@
"gameVersion": "0.13.2",
"id": "beatsaber-ipa-reloaded",
"name": "BSIPA",
"version": "3.12.6",
"version": "3.12.7",
"features": [
"define-feature(print, IPA.Loader.Features.PrintFeature)",
"define-feature(debug, IPA.Loader.Features.DebugFeature)",


+ 2
- 2
IPA/Properties/AssemblyInfo.cs View File

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.12.6")]
[assembly: AssemblyFileVersion("3.12.6")]
[assembly: AssemblyVersion("3.12.7")]
[assembly: AssemblyFileVersion("3.12.7")]

BIN
Refs/UnityEngine.CoreModule.dll View File


Loading…
Cancel
Save