0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 02:30:44 -05:00

Update modules with additional remappings

This commit is contained in:
Dev 2024-01-05 09:27:59 +00:00
parent 37432541c3
commit 59f9549ced
8 changed files with 11 additions and 18 deletions

View File

@ -40,7 +40,7 @@ namespace Aki.Core.Patches
}
[PatchPrefix]
private static bool PatchPrefix(ref GStruct21 legacyParams)
private static bool PatchPrefix(ref LegacyParamsStruct legacyParams)
{
//Console.WriteLine($"Original url {legacyParams.Url}");
legacyParams.Url = legacyParams.Url

View File

@ -1,14 +1,9 @@
using Aki.Reflection.Utils;
using Comfort.Common;
using Comfort.Common;
using EFT;
using EFT.Vehicle;
using HarmonyLib;
using System;
using System.Linq;
using UnityEngine;
using BTRController = GClass2911;
using BTRDataPacket = GStruct378;
using PlayerInteractPacket = GStruct167;
namespace Aki.Debugging.BTR
{
@ -18,7 +13,7 @@ namespace Aki.Debugging.BTR
private BotsController botsController;
private BotBTRService btrBotService;
private BTRController btrController;
private BTRControllerClass btrController;
private BTRVehicle btrServerSide;
private BTRView btrClientSide;
private BTRDataPacket btrDataPacket = default;
@ -42,12 +37,12 @@ namespace Aki.Debugging.BTR
if (gameWorld.BtrController == null)
{
if (!Singleton<BTRController>.Instantiated)
if (!Singleton<BTRControllerClass>.Instantiated)
{
Singleton<BTRController>.Create(new BTRController());
Singleton<BTRControllerClass>.Create(new BTRControllerClass());
}
gameWorld.BtrController = btrController = Singleton<BTRController>.Instance;
gameWorld.BtrController = btrController = Singleton<BTRControllerClass>.Instance;
}
botsController = Singleton<IBotGame>.Instance.BotsController;

View File

@ -14,7 +14,7 @@ namespace Aki.Debugging.BTR.Patches
{
protected override MethodBase GetTargetMethod()
{
var targetType = typeof(GClass1854).GetNestedTypes(PatchConstants.PrivateFlags).Where(x => x.Name == "Class1469").First();
var targetType = typeof(GetActionsClass).GetNestedTypes(PatchConstants.PrivateFlags).Where(x => x.Name == "Class1469").First();
return AccessTools.Method(targetType, "method_2");
}
@ -24,7 +24,7 @@ namespace Aki.Debugging.BTR.Patches
var gameWorld = Singleton<GameWorld>.Instance;
var player = gameWorld.MainPlayer;
var questController = (GClass3201)AccessTools.Field(player.GetType(), "_questController").GetValue(player);
var questController = (AbstractQuestControllerClass)AccessTools.Field(player.GetType(), "_questController").GetValue(player);
var inventoryController = (InventoryControllerClass)AccessTools.Field(player.GetType(), "_inventoryController").GetValue(player);
GClass3130 btrDialog = new GClass3130(player.Profile, Profile.TraderInfo.BTR_TRADER_ID, questController, inventoryController, null);

View File

@ -1,7 +1,6 @@
using Aki.Reflection.Patching;
using Comfort.Common;
using EFT;
using EFT.Vehicle;
using HarmonyLib;
using System.Reflection;

View File

@ -16,7 +16,7 @@ namespace Aki.Debugging.BTR.Patches
{
_statusProperty = AccessTools.Property(typeof(AbstractGame), "Status");
return AccessTools.Method(typeof(GClass2911), "method_1");
return AccessTools.Method(typeof(BTRControllerClass), "method_1");
}
[PatchPrefix]

View File

@ -1,6 +1,5 @@
using System.Reflection;
using Aki.Reflection.Patching;
using AchievementsController = GClass3207;
namespace Aki.SinglePlayer.Patches.Progression
{
@ -12,7 +11,7 @@ namespace Aki.SinglePlayer.Patches.Progression
{
protected override MethodBase GetTargetMethod()
{
return typeof(AchievementsController).GetConstructors()[0];
return typeof(AchievementControllerClass).GetConstructors()[0];
}
[PatchPrefix]

View File

@ -30,7 +30,7 @@ namespace Aki.SinglePlayer.Patches.Progression
var player = gameWorld.MainPlayer;
var questController = Traverse.Create(player).Field<GClass3201>("_questController").Value;
var questController = Traverse.Create(player).Field<AbstractQuestControllerClass>("_questController").Value;
if (questController != null)
{
foreach (var quest in questController.Quests.ToList())

Binary file not shown.