Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
He do be trying tho
Browse files Browse the repository at this point in the history
  • Loading branch information
misandrie committed Nov 29, 2023
1 parent 41dcc51 commit 5ba5e69
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions Marsey/GameAssemblyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,27 +86,18 @@ public static void GetGameAssemblies(out Assembly? clientAss, out Assembly? robu
Assembly[] asmlist = AppDomain.CurrentDomain.GetAssemblies();
foreach (Assembly asm in asmlist)
{
try
{
Console.WriteLine("Trying " + asm.FullName);
string? fullName = asm.FullName;
if (fullName == null) continue;

if (robustSharedAss == null && fullName.Contains("Robust.Shared,"))
robustSharedAss = asm;
else if (clientAss == null && fullName.Contains("Content.Client,"))
clientAss = asm;
else if (clientSharedAss == null && fullName.Contains("Content.Shared,"))
clientSharedAss = asm;

if (robustSharedAss != null && clientAss != null && clientSharedAss != null)
break;
}
catch (AccessViolationException e)
{
Console.WriteLine($"{asm.FullName} told you to fuck off");
throw;
}
string? fullName = asm.FullName;
if (fullName == null) continue;

if (robustSharedAss == null && fullName.Contains("Robust.Shared,"))
robustSharedAss = asm;
else if (clientAss == null && fullName.Contains("Content.Client,"))
clientAss = asm;
else if (clientSharedAss == null && fullName.Contains("Content.Shared,"))
clientSharedAss = asm;

if (robustSharedAss != null && clientAss != null && clientSharedAss != null)
break;
}

if (robustSharedAss != null && clientAss != null && clientSharedAss != null)
Expand Down

0 comments on commit 5ba5e69

Please sign in to comment.