mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 02:50:45 -05:00
added test BTR patch, not tested
This commit is contained in:
parent
e3bdf9c1fd
commit
53d99fff2f
@ -17,6 +17,7 @@ namespace Aki.Debugging
|
||||
new EndRaidDebug().Enable();
|
||||
// new CoordinatesPatch().Enable();
|
||||
// new StaticLootDumper().Enable();
|
||||
new BtrTestPatch().Enable();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
43
project/Aki.Debugging/Patches/BtrTestPatch.cs
Normal file
43
project/Aki.Debugging/Patches/BtrTestPatch.cs
Normal file
@ -0,0 +1,43 @@
|
||||
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]
|
||||
public void PostFixPatch()
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user