Skip to content

Commit

Permalink
Updated classdata.tpk
Browse files Browse the repository at this point in the history
  • Loading branch information
HerpDerpinstine committed Feb 3, 2025
1 parent 0a911e1 commit 5a7832f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion MelonLoader/MelonUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,20 @@ public static IntPtr GetNativeLibraryExport(this IntPtr ptr, string name)

public static ClassPackageFile LoadIncludedClassPackage(this AssetsManager assetsManager)
{
var asm = typeof(MelonUtils).Assembly;
var names = asm.GetManifestResourceNames();
string resourceName = null;
foreach (var name in names)
if (name.Contains("classdata"))
{
resourceName = name;
break;
}
if (string.IsNullOrEmpty(resourceName))
return null;

ClassPackageFile classPackage = null;
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MelonLoader.Resources.classdata.tpk"))
using (var stream = asm.GetManifestResourceStream(resourceName))
classPackage = assetsManager.LoadClassPackage(stream);
return classPackage;
}
Expand Down
Binary file modified MelonLoader/Resources/classdata.tpk
Binary file not shown.

0 comments on commit 5a7832f

Please sign in to comment.