Skip to content

Commit

Permalink
Added --melonloader.agfregex Launch Option to Force Regex used for As…
Browse files Browse the repository at this point in the history
…sembly Generation
  • Loading branch information
HerpDerpinstine committed Jan 15, 2022
1 parent 75ae0b5 commit 290a93d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
55. Moved InstallUnityTlsInterface Signature Scanning from Bootstrap to Il2CppUnityTls CL.
56. Fixed MissingMethodException Issue with HarmonyLib.AccessTools.
57. Fixed MissingMethodException Issue with MelonUtils.SetCurrentDomainBaseDirectory.
58. Added --melonloader.agfregex Launch Option to Force Regex used for Assembly Generation.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ internal DeobfuscationMap()
NewFileName = "DeobfuscationMap.csv.gz";
URL = RemoteAPI.Info.MappingURL;
Version = RemoteAPI.Info.MappingFileSHA512;
ObfuscationRegex = RemoteAPI.Info.ObfuscationRegex;

ObfuscationRegex = MelonLaunchOptions.Il2CppAssemblyGenerator.ForceRegex;
if (string.IsNullOrEmpty(ObfuscationRegex))
ObfuscationRegex = Config.Values.ObfuscationRegex;
if (string.IsNullOrEmpty(ObfuscationRegex)
&& MelonUtils.GameName.Equals("Among Us"))
ObfuscationRegex = "[A-Z]{11}";
Version = RemoteAPI.Info.ObfuscationRegex;
}

internal void Save()
Expand Down
2 changes: 2 additions & 0 deletions MelonLoader/MelonLaunchOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public static class Il2CppAssemblyGenerator
public static string ForceVersion_Dumper { get; internal set; }
public static string ForceVersion_Il2CppAssemblyUnhollower { get; internal set; }
public static string ForceVersion_UnityDependencies { get; internal set; }
public static string ForceRegex { get; internal set; }

internal static void Setup()
{
Expand All @@ -116,6 +117,7 @@ internal static void Setup()
WithArg["melonloader.agfvdumper"] = (string arg) => ForceVersion_Dumper = arg;
WithArg["melonloader.agfvunhollower"] = (string arg) => ForceVersion_Il2CppAssemblyUnhollower = arg;
WithArg["melonloader.agfvunity"] = (string arg) => ForceVersion_UnityDependencies = arg;
WithArg["melonloader.agfregex"] = (string arg) => ForceRegex = arg;
}
}
#endregion
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ You can read more about attaching the dnSpy debugger in the [MelonLoader wiki](h
| --melonloader.agfvunity | Forces Assembly Generator to use a Specified Version of Unity Dependencies |
| --melonloader.agfvdumper | Forces Assembly Generator to use a Specified Version of Dumper |
| --melonloader.agfvunhollower | Forces Assembly Generator to use a Specified Version of Il2CppAssemblyUnhollower |
| --melonloader.agfregex | Forces Assembly Generator to use a Specified Regex |
| --melonloader.basedir | Changes the Proxy's Load Directory for the Bootstrap |
| --melonloader.disablestartscreen | Disable the Start Screen |
| --melonloader.disableunityclc | Disable Unity Console Log Cleaner |
Expand Down

0 comments on commit 290a93d

Please sign in to comment.