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

43 lines
985 B
C#
Raw Normal View History

2023-12-30 15:27:30 +00:00
using System.Reflection;
using Aki.Reflection.Patching;
using Comfort.Common;
using EFT;
using EFT.UI;
namespace Aki.Debugging.Patches
{
public class BtrTestPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(GameWorld).GetMethod(nameof(GameWorld.OnGameStarted));
}
[PatchPostfix]
2023-12-30 15:32:51 +00:00
public static void PostFixPatch()
2023-12-30 15:27:30 +00:00
{
try
{
var gameworld = Singleton<GameWorld>.Instance;
var botGame = Singleton<IBotGame>.Instance;
gameworld.BtrController = new GClass2911();
botGame.BotsController.BotSpawner.SpawnBotBTR();
var btrTransform = gameworld.BtrController?.BtrVehicle?.gameObject?.transform;
if (btrTransform != null)
{
ConsoleScreen.Log($"[AKI-BTR] Btr Location {btrTransform}");
} else {
ConsoleScreen.Log($"[AKI-BTR] wasnt able to get BTR location");
}
}
catch (System.Exception)
{
ConsoleScreen.Log("[AKI-BTR] Exception thrown, check logs");
throw;
}
}
}
}