mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 01:50:45 -05:00
24964
This commit is contained in:
parent
9482040d08
commit
8bef9700e2
@ -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
|
||||
|
@ -63,19 +63,32 @@ namespace Aki.Custom.Patches
|
||||
return false;
|
||||
}
|
||||
|
||||
public static string GetPairKey(KeyValuePair<string, BundleItem> x)
|
||||
private static async Task Init(EasyAssets instance, [CanBeNull] IBundleLock bundleLock, string defaultKey, string rootPath,
|
||||
string platformName, [CanBeNull] Func<string, bool> shouldExclude, Func<string, Task> 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<string, BundleItem> 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<CompatibilityAssetBundleManifest> 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<string, bool> shouldExclude, Func<string, Task> bundleCheck)
|
||||
public static string GetPairKey(KeyValuePair<string, BundleItem> 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<string, BundleItem> 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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ namespace Aki.Custom.Patches
|
||||
var player = Singleton<GameWorld>.Instance.MainPlayer;
|
||||
if (profileId == player?.Profile.Id)
|
||||
{
|
||||
GClass2974.Instance.CloseAllScreensForced();
|
||||
GClass2975.Instance.CloseAllScreensForced();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -114,9 +114,9 @@ namespace Aki.SinglePlayer.Patches.ScavMode
|
||||
|
||||
// Get fields from MainMenuController.cs
|
||||
var raidSettings = Traverse.Create(menuController).Field("raidSettings_0").GetValue<RaidSettings>();
|
||||
var matchmakerPlayersController = Traverse.Create(menuController).Field("gclass3027_0").GetValue<GClass3027>();
|
||||
var matchmakerPlayersController = Traverse.Create(menuController).Field("gclass3028_0").GetValue<GClass3028>();
|
||||
|
||||
var gclass = new MatchmakerOfflineRaidScreen.GClass3016(profile?.Info, ref raidSettings, matchmakerPlayersController);
|
||||
var gclass = new MatchmakerOfflineRaidScreen.GClass3017(profile?.Info, ref raidSettings, matchmakerPlayersController);
|
||||
|
||||
gclass.OnShowNextScreen += LoadOfflineRaidNextScreen;
|
||||
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user