diff --git a/project/SPT.SinglePlayer/Patches/MainMenu/RemoveClothingItemExternalObtainLabelPatch.cs b/project/SPT.SinglePlayer/Patches/MainMenu/RemoveClothingItemExternalObtainLabelPatch.cs new file mode 100644 index 0000000..251026e --- /dev/null +++ b/project/SPT.SinglePlayer/Patches/MainMenu/RemoveClothingItemExternalObtainLabelPatch.cs @@ -0,0 +1,20 @@ +using EFT.UI; +using SPT.Reflection.Patching; +using System.Reflection; + +namespace SPT.SinglePlayer.Patches.MainMenu +{ + internal class RemoveClothingItemExternalObtainLabelPatch : ModulePatch + { + protected override MethodBase GetTargetMethod() + { + return typeof(ClothingItem).GetMethod(nameof(ClothingItem.Init)); + } + + [PatchPrefix] + private static void Prefix(ref ClothingItem.GClass3338 offer) + { + offer.Offer.ExternalObtain = false; + } + } +} diff --git a/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs b/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs index 6386cd3..d7847bb 100644 --- a/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs +++ b/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs @@ -62,7 +62,8 @@ namespace SPT.SinglePlayer new InsuranceScreenPatch().Enable(); new FixQuestAchieveControllersPatch().Enable(); new RemoveStashUpgradeLabelPatch().Enable(); - } + new RemoveClothingItemExternalObtainLabelPatch().Enable(); + } catch (Exception ex) { Logger.LogError($"A PATCH IN {GetType().Name} FAILED. SUBSEQUENT PATCHES HAVE NOT LOADED");