mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-12 22:50:44 -05:00
Move BTR code into Aki.Custom (!66)
- Move most BTR code to Aki.Custom (Leaving debug commands in Aki.Debugging) - Make BTR patches public to match other patches - Disable debug BTR command patches Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com> Reviewed-on: SPT-AKI/Modules#66 Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com> Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
This commit is contained in:
parent
dee1e4a76c
commit
701c3a6685
@ -39,6 +39,7 @@
|
||||
<ProjectReference Include="..\Aki.PrePatch\Aki.PrePatch.csproj" />
|
||||
<ProjectReference Include="..\Aki.Common\Aki.Common.csproj" />
|
||||
<ProjectReference Include="..\Aki.Reflection\Aki.Reflection.csproj" />
|
||||
<ProjectReference Include="..\Aki.SinglePlayer\Aki.SinglePlayer.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using Aki.Common;
|
||||
using Aki.Custom.Airdrops.Patches;
|
||||
using Aki.Custom.BTR.Patches;
|
||||
using Aki.Custom.Patches;
|
||||
using Aki.Custom.Utils;
|
||||
using BepInEx;
|
||||
@ -49,6 +50,19 @@ namespace Aki.Custom
|
||||
new RagfairFeePatch().Enable();
|
||||
new ScavQuestPatch().Enable();
|
||||
new FixBrokenSpawnOnSandboxPatch().Enable();
|
||||
new BTRPathLoadPatch().Enable();
|
||||
new BTRActivateTraderDialogPatch().Enable();
|
||||
new BTRInteractionPatch().Enable();
|
||||
new BTRExtractPassengersPatch().Enable();
|
||||
new BTRBotAttachPatch().Enable();
|
||||
new BTRBotInitPatch().Enable();
|
||||
new BTRReceiveDamageInfoPatch().Enable();
|
||||
new BTRTurretCanShootPatch().Enable();
|
||||
new BTRTurretDefaultAimingPositionPatch().Enable();
|
||||
new BTRIsDoorsClosedPath().Enable();
|
||||
new BTRPatch().Enable();
|
||||
new BTRTransferItemsPatch().Enable();
|
||||
new BTREndRaidItemDeliveryPatch().Enable();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Aki.Debugging.BTR.Utils;
|
||||
using Aki.Custom.BTR.Utils;
|
||||
using Aki.SinglePlayer.Utils.TraderServices;
|
||||
using Comfort.Common;
|
||||
using EFT;
|
||||
@ -14,7 +14,7 @@ using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
using BotEventHandler = GClass595;
|
||||
|
||||
namespace Aki.Debugging.BTR
|
||||
namespace Aki.Custom.BTR
|
||||
{
|
||||
public class BTRManager : MonoBehaviour
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using EFT.Interactive;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Aki.Debugging.BTR
|
||||
namespace Aki.Custom.BTR
|
||||
{
|
||||
public class BTRRoadKillTrigger : DamageTrigger
|
||||
{
|
@ -8,9 +8,9 @@ using System;
|
||||
using System.Reflection;
|
||||
using static EFT.UI.TraderDialogScreen;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
internal class BTRActivateTraderDialogPatch : ModulePatch
|
||||
public class BTRActivateTraderDialogPatch : ModulePatch
|
||||
{
|
||||
private static FieldInfo _playerInventoryControllerField;
|
||||
private static FieldInfo _playerQuestControllerField;
|
@ -8,7 +8,7 @@ using HarmonyLib;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
// Fixes the BTR Bot initialization in AttachBot() of BTRTurretView
|
||||
//
|
||||
@ -16,7 +16,7 @@ namespace Aki.Debugging.BTR.Patches
|
||||
// ClientGameWorld in LiveEFT will register the server-side BTR Bot as type ObservedPlayerView and is stored in GameWorld's allObservedPlayersByID dictionary.
|
||||
// In SPT, GameWorld.allObservedPlayersByID is empty which results in the game never finishing the initialization of the BTR Bot which includes disabling its gun, voice and mesh renderers.
|
||||
// For now, we do dirty patches to work around the lack of ObservedPlayerView, using Player instead.
|
||||
internal class BTRBotAttachPatch : ModulePatch
|
||||
public class BTRBotAttachPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
@ -10,7 +10,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
// Fixes the BTR Bot initialization in method_1() of BTRTurretView
|
||||
//
|
||||
@ -18,7 +18,7 @@ namespace Aki.Debugging.BTR.Patches
|
||||
// ClientGameWorld in LiveEFT will register the server-side BTR Bot as type ObservedPlayerView and is stored in GameWorld's allObservedPlayersByID dictionary.
|
||||
// In SPT, allObservedPlayersByID is empty which results in the game never finishing the initialization of the BTR Bot which includes disabling its gun, voice and mesh renderers.
|
||||
// For now, we do dirty patches to work around the lack of ObservedPlayerView, using Player instead.
|
||||
internal class BTRBotInitPatch : ModulePatch
|
||||
public class BTRBotInitPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
@ -1,6 +1,5 @@
|
||||
using Aki.Common.Http;
|
||||
using Aki.Common.Utils;
|
||||
using Aki.Debugging.BTR.Utils;
|
||||
using Aki.Custom.BTR.Utils;
|
||||
using Aki.Reflection.Patching;
|
||||
using Aki.Reflection.Utils;
|
||||
using Comfort.Common;
|
||||
@ -11,9 +10,9 @@ using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
internal class BTREndRaidItemDeliveryPatch : ModulePatch
|
||||
public class BTREndRaidItemDeliveryPatch : ModulePatch
|
||||
{
|
||||
private static JsonConverter[] _defaultJsonConverters;
|
||||
|
@ -5,9 +5,9 @@ using EFT.Vehicle;
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
internal class BTRExtractPassengersPatch : ModulePatch
|
||||
public class BTRExtractPassengersPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
@ -7,9 +7,9 @@ using HarmonyLib;
|
||||
using System.Reflection;
|
||||
using GlobalEventHandler = GClass2909;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
internal class BTRInteractionPatch : ModulePatch
|
||||
public class BTRInteractionPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
@ -4,9 +4,9 @@ using EFT;
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
internal class BTRIsDoorsClosedPath : ModulePatch
|
||||
public class BTRIsDoorsClosedPath : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
@ -6,12 +6,12 @@ using EFT;
|
||||
using EFT.UI;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds a BTRManager component to the GameWorld game object when raid starts.
|
||||
/// </summary>
|
||||
internal class BTRPatch : ModulePatch
|
||||
public class BTRPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
@ -4,11 +4,11 @@ using EFT;
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
// The BTRManager MapPathsConfiguration loading depends on the game state being set to Starting
|
||||
// so set it to Starting while the method is running, then reset it afterwards
|
||||
internal class BTRPathLoadPatch : ModulePatch
|
||||
public class BTRPathLoadPatch : ModulePatch
|
||||
{
|
||||
private static PropertyInfo _statusProperty;
|
||||
private static GameStatus originalStatus;
|
@ -6,12 +6,12 @@ using HarmonyLib;
|
||||
using System.Reflection;
|
||||
using BotEventHandler = GClass595;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
/// <summary>
|
||||
/// Patches an empty method in <see cref="BTRView"/> to handle updating the BTR bot's Neutrals and Enemies lists in response to taking damage.
|
||||
/// </summary>
|
||||
internal class BTRReceiveDamageInfoPatch : ModulePatch
|
||||
public class BTRReceiveDamageInfoPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
@ -1,13 +1,13 @@
|
||||
using Aki.Debugging.BTR.Utils;
|
||||
using Aki.Custom.BTR.Utils;
|
||||
using Aki.Reflection.Patching;
|
||||
using Aki.SinglePlayer.Utils.TraderServices;
|
||||
using EFT.UI;
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
internal class BTRTransferItemsPatch : ModulePatch
|
||||
public class BTRTransferItemsPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
@ -4,9 +4,9 @@ using HarmonyLib;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
internal class BTRTurretCanShootPatch : ModulePatch
|
||||
public class BTRTurretCanShootPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
@ -4,9 +4,9 @@ using HarmonyLib;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
internal class BTRTurretDefaultAimingPositionPatch : ModulePatch
|
||||
public class BTRTurretDefaultAimingPositionPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
@ -6,7 +6,7 @@ using EFT.InventoryLogic;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace Aki.Debugging.BTR.Utils
|
||||
namespace Aki.Custom.BTR.Utils
|
||||
{
|
||||
public static class BTRUtil
|
||||
{
|
@ -29,9 +29,9 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Aki.Common\Aki.Common.csproj" />
|
||||
<ProjectReference Include="..\Aki.Custom\Aki.Custom.csproj" />
|
||||
<ProjectReference Include="..\Aki.PrePatch\Aki.PrePatch.csproj" />
|
||||
<ProjectReference Include="..\Aki.Reflection\Aki.Reflection.csproj" />
|
||||
<ProjectReference Include="..\Aki.SinglePlayer\Aki.SinglePlayer.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using Aki.Common;
|
||||
using Aki.Debugging.BTR.Patches;
|
||||
using Aki.Debugging.Patches;
|
||||
using BepInEx;
|
||||
|
||||
@ -18,23 +17,10 @@ namespace Aki.Debugging
|
||||
new EndRaidDebug().Enable();
|
||||
// new CoordinatesPatch().Enable();
|
||||
// new StaticLootDumper().Enable();
|
||||
new BTRPathLoadPatch().Enable();
|
||||
new BTRActivateTraderDialogPatch().Enable();
|
||||
new BTRInteractionPatch().Enable();
|
||||
new BTRExtractPassengersPatch().Enable();
|
||||
new BTRBotAttachPatch().Enable();
|
||||
new BTRBotInitPatch().Enable();
|
||||
new BTRReceiveDamageInfoPatch().Enable();
|
||||
new BTRTurretCanShootPatch().Enable();
|
||||
new BTRTurretDefaultAimingPositionPatch().Enable();
|
||||
new BTRIsDoorsClosedPath().Enable();
|
||||
new BTRPatch().Enable();
|
||||
new BTRTransferItemsPatch().Enable();
|
||||
new BTREndRaidItemDeliveryPatch().Enable();
|
||||
|
||||
// Debug command patches, can be disabled later
|
||||
new BTRDebugCommandPatch().Enable();
|
||||
new BTRDebugDataPatch().Enable();
|
||||
// BTR debug command patches, can be disabled later
|
||||
//new BTRDebugCommandPatch().Enable();
|
||||
//new BTRDebugDataPatch().Enable();
|
||||
|
||||
//new PMCBotSpawnLocationPatch().Enable();
|
||||
}
|
||||
|
@ -1,13 +1,12 @@
|
||||
using Aki.Debugging.BTR.Utils;
|
||||
using Aki.Custom.BTR.Patches;
|
||||
using Aki.Reflection.Patching;
|
||||
using Aki.SinglePlayer.Utils.TraderServices;
|
||||
using EFT;
|
||||
using EFT.Console.Core;
|
||||
using EFT.UI;
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Aki.Debugging.BTR.Patches
|
||||
namespace Aki.Debugging.Patches
|
||||
{
|
||||
// Enable the `debug_show_dialog_screen` command, and custom `btr_deliver_items` command
|
||||
internal class BTRDebugCommandPatch : ModulePatch
|
Loading…
x
Reference in New Issue
Block a user