using System.Reflection; using SPT.Reflection.Patching; namespace SPT.Custom.Patches { /// /// Every maps base.json config from BSG come with a "MinPlayersCountToSpawnAirdrop" property value of 6, /// this patch sets the associated property to always return 1 regardless of what config says /// public class AllowAirdropsInPvEPatch : ModulePatch { protected override MethodBase GetTargetMethod() { return typeof(GClass2404).GetProperty(nameof(GClass2404.Int32_0)).GetGetMethod(); } [PatchPrefix] public static bool PatchPrefix(ref int __result) { __result = 1; return false; // Skip original } } }