mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 06:10:45 -05:00
Update modules with additional remappings
This commit is contained in:
parent
37432541c3
commit
59f9549ced
@ -40,7 +40,7 @@ namespace Aki.Core.Patches
|
|||||||
}
|
}
|
||||||
|
|
||||||
[PatchPrefix]
|
[PatchPrefix]
|
||||||
private static bool PatchPrefix(ref GStruct21 legacyParams)
|
private static bool PatchPrefix(ref LegacyParamsStruct legacyParams)
|
||||||
{
|
{
|
||||||
//Console.WriteLine($"Original url {legacyParams.Url}");
|
//Console.WriteLine($"Original url {legacyParams.Url}");
|
||||||
legacyParams.Url = legacyParams.Url
|
legacyParams.Url = legacyParams.Url
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
using Aki.Reflection.Utils;
|
using Comfort.Common;
|
||||||
using Comfort.Common;
|
|
||||||
using EFT;
|
using EFT;
|
||||||
using EFT.Vehicle;
|
using EFT.Vehicle;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using BTRController = GClass2911;
|
|
||||||
using BTRDataPacket = GStruct378;
|
|
||||||
using PlayerInteractPacket = GStruct167;
|
|
||||||
|
|
||||||
namespace Aki.Debugging.BTR
|
namespace Aki.Debugging.BTR
|
||||||
{
|
{
|
||||||
@ -18,7 +13,7 @@ namespace Aki.Debugging.BTR
|
|||||||
private BotsController botsController;
|
private BotsController botsController;
|
||||||
|
|
||||||
private BotBTRService btrBotService;
|
private BotBTRService btrBotService;
|
||||||
private BTRController btrController;
|
private BTRControllerClass btrController;
|
||||||
private BTRVehicle btrServerSide;
|
private BTRVehicle btrServerSide;
|
||||||
private BTRView btrClientSide;
|
private BTRView btrClientSide;
|
||||||
private BTRDataPacket btrDataPacket = default;
|
private BTRDataPacket btrDataPacket = default;
|
||||||
@ -42,12 +37,12 @@ namespace Aki.Debugging.BTR
|
|||||||
|
|
||||||
if (gameWorld.BtrController == null)
|
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;
|
botsController = Singleton<IBotGame>.Instance.BotsController;
|
||||||
|
@ -14,7 +14,7 @@ namespace Aki.Debugging.BTR.Patches
|
|||||||
{
|
{
|
||||||
protected override MethodBase GetTargetMethod()
|
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");
|
return AccessTools.Method(targetType, "method_2");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ namespace Aki.Debugging.BTR.Patches
|
|||||||
var gameWorld = Singleton<GameWorld>.Instance;
|
var gameWorld = Singleton<GameWorld>.Instance;
|
||||||
var player = gameWorld.MainPlayer;
|
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);
|
var inventoryController = (InventoryControllerClass)AccessTools.Field(player.GetType(), "_inventoryController").GetValue(player);
|
||||||
|
|
||||||
GClass3130 btrDialog = new GClass3130(player.Profile, Profile.TraderInfo.BTR_TRADER_ID, questController, inventoryController, null);
|
GClass3130 btrDialog = new GClass3130(player.Profile, Profile.TraderInfo.BTR_TRADER_ID, questController, inventoryController, null);
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
using Aki.Reflection.Patching;
|
using Aki.Reflection.Patching;
|
||||||
using Comfort.Common;
|
using Comfort.Common;
|
||||||
using EFT;
|
using EFT;
|
||||||
using EFT.Vehicle;
|
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ namespace Aki.Debugging.BTR.Patches
|
|||||||
{
|
{
|
||||||
_statusProperty = AccessTools.Property(typeof(AbstractGame), "Status");
|
_statusProperty = AccessTools.Property(typeof(AbstractGame), "Status");
|
||||||
|
|
||||||
return AccessTools.Method(typeof(GClass2911), "method_1");
|
return AccessTools.Method(typeof(BTRControllerClass), "method_1");
|
||||||
}
|
}
|
||||||
|
|
||||||
[PatchPrefix]
|
[PatchPrefix]
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Aki.Reflection.Patching;
|
using Aki.Reflection.Patching;
|
||||||
using AchievementsController = GClass3207;
|
|
||||||
|
|
||||||
namespace Aki.SinglePlayer.Patches.Progression
|
namespace Aki.SinglePlayer.Patches.Progression
|
||||||
{
|
{
|
||||||
@ -12,7 +11,7 @@ namespace Aki.SinglePlayer.Patches.Progression
|
|||||||
{
|
{
|
||||||
protected override MethodBase GetTargetMethod()
|
protected override MethodBase GetTargetMethod()
|
||||||
{
|
{
|
||||||
return typeof(AchievementsController).GetConstructors()[0];
|
return typeof(AchievementControllerClass).GetConstructors()[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
[PatchPrefix]
|
[PatchPrefix]
|
||||||
|
@ -30,7 +30,7 @@ namespace Aki.SinglePlayer.Patches.Progression
|
|||||||
|
|
||||||
var player = gameWorld.MainPlayer;
|
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)
|
if (questController != null)
|
||||||
{
|
{
|
||||||
foreach (var quest in questController.Quests.ToList())
|
foreach (var quest in questController.Quests.ToList())
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user