diff --git a/README.md b/README.md index bafb347..8744afc 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ git config --local user.email "USERNAME@SOMETHING.com" ## Requirements -- Escape From Tarkov 24696 +- Escape From Tarkov 24964 - BepInEx 5.4.19 - Visual Studio Code - .NET 6 SDK diff --git a/project/Aki.Custom/Patches/EasyAssetsPatch.cs b/project/Aki.Custom/Patches/EasyAssetsPatch.cs index 9f45526..d04172a 100644 --- a/project/Aki.Custom/Patches/EasyAssetsPatch.cs +++ b/project/Aki.Custom/Patches/EasyAssetsPatch.cs @@ -63,19 +63,32 @@ namespace Aki.Custom.Patches return false; } - public static string GetPairKey(KeyValuePair x) + private static async Task Init(EasyAssets instance, [CanBeNull] IBundleLock bundleLock, string defaultKey, string rootPath, + string platformName, [CanBeNull] Func shouldExclude, Func bundleCheck) { - return x.Key; - } + // platform manifest + var path = $"{rootPath.Replace("file:///", string.Empty).Replace("file://", string.Empty)}/{platformName}/"; + var filepath = path + platformName; + var manifest = (File.Exists(filepath)) ? await GetManifestBundle(filepath) : await GetManifestJson(filepath); - public static BundleDetails GetPairValue(KeyValuePair x) - { - return new BundleDetails + // load bundles + var bundleNames = manifest.GetAllAssetBundles().Union(BundleManager.Bundles.Keys).ToArray(); + var bundles = (IEasyBundle[])Array.CreateInstance(EasyBundleHelper.Type, bundleNames.Length); + + if (bundleLock == null) { - FileName = x.Value.FileName, - Crc = x.Value.Crc, - Dependencies = x.Value.Dependencies - }; + bundleLock = new BundleLock(int.MaxValue); + } + + for (var i = 0; i < bundleNames.Length; i++) + { + bundles[i] = (IEasyBundle)Activator.CreateInstance(EasyBundleHelper.Type, new object[] { bundleNames[i], path, manifest, bundleLock, bundleCheck }); + await JobScheduler.Yield(EJobPriority.Immediate); + } + + _manifestField.SetValue(instance, manifest); + _bundlesField.SetValue(instance, bundles); + _systemProperty.SetValue(instance, new DependencyGraph(bundles, defaultKey, shouldExclude)); } private static async Task GetManifestBundle(string filepath) @@ -106,32 +119,19 @@ namespace Aki.Custom.Patches return manifest; } - private static async Task Init(EasyAssets instance, [CanBeNull] IBundleLock bundleLock, string defaultKey, string rootPath, - string platformName, [CanBeNull] Func shouldExclude, Func bundleCheck) + public static string GetPairKey(KeyValuePair x) { - // platform manifest - var path = $"{rootPath.Replace("file:///", string.Empty).Replace("file://", string.Empty)}/{platformName}/"; - var filepath = path + platformName; - var manifest = (File.Exists(filepath)) ? await GetManifestBundle(filepath) : await GetManifestJson(filepath); + return x.Key; + } - // load bundles - var bundleNames = manifest.GetAllAssetBundles().Union(BundleManager.Bundles.Keys).ToArray(); - var bundles = (IEasyBundle[])Array.CreateInstance(EasyBundleHelper.Type, bundleNames.Length); - - if (bundleLock == null) + public static BundleDetails GetPairValue(KeyValuePair x) + { + return new BundleDetails { - bundleLock = new BundleLock(int.MaxValue); - } - - for (var i = 0; i < bundleNames.Length; i++) - { - bundles[i] = (IEasyBundle)Activator.CreateInstance(EasyBundleHelper.Type, new object[] { bundleNames[i], path, manifest, bundleLock, bundleCheck }); - await JobScheduler.Yield(EJobPriority.Immediate); - } - - _manifestField.SetValue(instance, manifest); - _bundlesField.SetValue(instance, bundles); - _systemProperty.SetValue(instance, new DependencyGraph(bundles, defaultKey, shouldExclude)); + FileName = x.Value.FileName, + Crc = x.Value.Crc, + Dependencies = x.Value.Dependencies + }; } } } diff --git a/project/Aki.Custom/Patches/ExitWhileLootingPatch.cs b/project/Aki.Custom/Patches/ExitWhileLootingPatch.cs index 7f82558..358ed2d 100644 --- a/project/Aki.Custom/Patches/ExitWhileLootingPatch.cs +++ b/project/Aki.Custom/Patches/ExitWhileLootingPatch.cs @@ -33,7 +33,7 @@ namespace Aki.Custom.Patches var player = Singleton.Instance.MainPlayer; if (profileId == player?.Profile.Id) { - GClass2974.Instance.CloseAllScreensForced(); + GClass2975.Instance.CloseAllScreensForced(); } return true; diff --git a/project/Aki.SinglePlayer/Patches/RaidFix/PostRaidHealingPricePatch.cs b/project/Aki.SinglePlayer/Patches/RaidFix/PostRaidHealingPricePatch.cs index 1e377c0..158740e 100644 --- a/project/Aki.SinglePlayer/Patches/RaidFix/PostRaidHealingPricePatch.cs +++ b/project/Aki.SinglePlayer/Patches/RaidFix/PostRaidHealingPricePatch.cs @@ -2,7 +2,7 @@ using HarmonyLib; using System; using System.Reflection; -using TraderInfo = EFT.Profile.GClass1726; +using TraderInfo = EFT.Profile.GClass1727; namespace Aki.SinglePlayer.Patches.RaidFix { diff --git a/project/Aki.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs b/project/Aki.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs index 0c32402..6b763e9 100644 --- a/project/Aki.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs +++ b/project/Aki.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs @@ -114,9 +114,9 @@ namespace Aki.SinglePlayer.Patches.ScavMode // Get fields from MainMenuController.cs var raidSettings = Traverse.Create(menuController).Field("raidSettings_0").GetValue(); - var matchmakerPlayersController = Traverse.Create(menuController).Field("gclass3027_0").GetValue(); + var matchmakerPlayersController = Traverse.Create(menuController).Field("gclass3028_0").GetValue(); - var gclass = new MatchmakerOfflineRaidScreen.GClass3016(profile?.Info, ref raidSettings, matchmakerPlayersController); + var gclass = new MatchmakerOfflineRaidScreen.GClass3017(profile?.Info, ref raidSettings, matchmakerPlayersController); gclass.OnShowNextScreen += LoadOfflineRaidNextScreen; diff --git a/project/Shared/Hollowed/hollowed.dll b/project/Shared/Hollowed/hollowed.dll index 2a6f6e9..8666fba 100644 Binary files a/project/Shared/Hollowed/hollowed.dll and b/project/Shared/Hollowed/hollowed.dll differ