diff --git a/project/SPT.SinglePlayer/Patches/RaidFix/LabsKeycardRemovalPatch.cs b/project/SPT.SinglePlayer/Patches/RaidFix/LabsKeycardRemovalPatch.cs deleted file mode 100644 index 5e3384d..0000000 --- a/project/SPT.SinglePlayer/Patches/RaidFix/LabsKeycardRemovalPatch.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Linq; -using System.Reflection; -using SPT.Reflection.Patching; -using Comfort.Common; -using EFT; -using HarmonyLib; -using EFT.InventoryLogic; - -namespace SPT.SinglePlayer.Patches.RaidFix -{ - /// - /// Patch to remove the Labs Access Card from player inventory upon entering Labs - /// - public class LabsKeycardRemovalPatch : ModulePatch - { - private const string LabsAccessCardTemplateId = "5c94bbff86f7747ee735c08f"; - - protected override MethodBase GetTargetMethod() - { - return AccessTools.Method(typeof(GameWorld), nameof(GameWorld.OnGameStarted)); - } - - [PatchPostfix] - public static void PatchPostfix() - { - var gameWorld = Singleton.Instance; - var player = gameWorld?.MainPlayer; - - if (gameWorld == null || player == null) - { - return; - } - - if (gameWorld.MainPlayer.Location.ToLower() != "laboratory") - { - return; - } - - var accessCardItem = player.Profile.Inventory.AllRealPlayerItems.FirstOrDefault(x => x.TemplateId == LabsAccessCardTemplateId); - - if (accessCardItem == null) - { - return; - } - - var inventoryController = Traverse.Create(player).Field("_inventoryController").Value; - InteractionsHandlerClass.Remove(accessCardItem, inventoryController); - } - } -} \ No newline at end of file diff --git a/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs b/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs index 29d3c9d..363f220 100644 --- a/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs +++ b/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs @@ -46,7 +46,6 @@ namespace SPT.SinglePlayer new LoadOfflineRaidScreenPatch().Enable(); new PluginErrorNotifierPatch().Enable(); new GetNewBotTemplatesPatch().Enable(); - new LabsKeycardRemovalPatch().Enable(); new MapReadyButtonPatch().Enable(); new RemoveUsedBotProfilePatch().Enable(); new ScavLateStartPatch().Enable();