From f08011788c2b7452abb500adccefa71ca78c4ed8 Mon Sep 17 00:00:00 2001 From: Lacyway Date: Thu, 1 Aug 2024 19:50:59 +0000 Subject: [PATCH] Make patches public (!152) Some patches are `internal` that should be `public` so that mods can disable them when altering AI. Co-authored-by: Lacyway <20912169+Lacyway@users.noreply.github.com> Reviewed-on: https://dev.sp-tarkov.com/SPT/Modules/pulls/152 Co-authored-by: Lacyway Co-committed-by: Lacyway --- project/SPT.Custom/Patches/BotCallForHelpCallBotPatch.cs | 2 +- project/SPT.Custom/Patches/BotCalledDataTryCallPatch.cs | 2 +- project/SPT.Custom/Patches/BotOwnerDisposePatch.cs | 2 +- project/SPT.Custom/Patches/BotSelfEnemyPatch.cs | 2 +- .../SPT.SinglePlayer/Patches/ScavMode/ScavEncyclopediaPatch.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/project/SPT.Custom/Patches/BotCallForHelpCallBotPatch.cs b/project/SPT.Custom/Patches/BotCallForHelpCallBotPatch.cs index e0a2cae..64c2cf4 100644 --- a/project/SPT.Custom/Patches/BotCallForHelpCallBotPatch.cs +++ b/project/SPT.Custom/Patches/BotCallForHelpCallBotPatch.cs @@ -12,7 +12,7 @@ namespace SPT.Custom.Patches * * This results in both an NRE, and the called bots target location being wrong */ - internal class BotCallForHelpCallBotPatch : ModulePatch + public class BotCallForHelpCallBotPatch : ModulePatch { private static FieldInfo _originalPanicTypeField; diff --git a/project/SPT.Custom/Patches/BotCalledDataTryCallPatch.cs b/project/SPT.Custom/Patches/BotCalledDataTryCallPatch.cs index 5a8ba51..663a56f 100644 --- a/project/SPT.Custom/Patches/BotCalledDataTryCallPatch.cs +++ b/project/SPT.Custom/Patches/BotCalledDataTryCallPatch.cs @@ -9,7 +9,7 @@ namespace SPT.Custom.Patches * It's possible for `AddEnemy` to return false, in that case, further code in TryCall will fail, * so we do the first bit of `TryCall` ourselves, and skip the original function if AddEnemy fails */ - internal class BotCalledDataTryCallPatch : ModulePatch + public class BotCalledDataTryCallPatch : ModulePatch { protected override MethodBase GetTargetMethod() { diff --git a/project/SPT.Custom/Patches/BotOwnerDisposePatch.cs b/project/SPT.Custom/Patches/BotOwnerDisposePatch.cs index 365e5f5..9242e71 100644 --- a/project/SPT.Custom/Patches/BotOwnerDisposePatch.cs +++ b/project/SPT.Custom/Patches/BotOwnerDisposePatch.cs @@ -9,7 +9,7 @@ namespace SPT.Custom.Patches * BotOwner doesn't call SetOff on the CalledData object when a bot is disposed, this can result * in bots that are no longer alive having their `OnEnemyAdd` method called */ - internal class BotOwnerDisposePatch : ModulePatch + public class BotOwnerDisposePatch : ModulePatch { protected override MethodBase GetTargetMethod() { diff --git a/project/SPT.Custom/Patches/BotSelfEnemyPatch.cs b/project/SPT.Custom/Patches/BotSelfEnemyPatch.cs index 1f1b4aa..97a0482 100644 --- a/project/SPT.Custom/Patches/BotSelfEnemyPatch.cs +++ b/project/SPT.Custom/Patches/BotSelfEnemyPatch.cs @@ -8,7 +8,7 @@ namespace SPT.Custom.Patches /// /// Goal: patch removes the current bot from its own enemy list - occurs when adding bots type to its enemy array in difficulty settings /// - internal class BotSelfEnemyPatch : ModulePatch + public class BotSelfEnemyPatch : ModulePatch { protected override MethodBase GetTargetMethod() { diff --git a/project/SPT.SinglePlayer/Patches/ScavMode/ScavEncyclopediaPatch.cs b/project/SPT.SinglePlayer/Patches/ScavMode/ScavEncyclopediaPatch.cs index 6db0b85..a4467b6 100644 --- a/project/SPT.SinglePlayer/Patches/ScavMode/ScavEncyclopediaPatch.cs +++ b/project/SPT.SinglePlayer/Patches/ScavMode/ScavEncyclopediaPatch.cs @@ -12,7 +12,7 @@ namespace SPT.SinglePlayer.Patches.ScavMode * At the start of a scav raid, copy the PMC encyclopedia to the scav profile, and * make sure the scav knows all of the items it has in its inventory */ - internal class ScavEncyclopediaPatch : ModulePatch + public class ScavEncyclopediaPatch : ModulePatch { protected override MethodBase GetTargetMethod() {