Files
se-launcher/CringeLauncher/Patches/WhitelistAllowPatch.cs
pas2704 94fc8a55c0
All checks were successful
Build / Compute Version (push) Successful in 6s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 4m4s
Build / Build Nuget package (NuGet) (push) Successful in 4m7s
Build / Build Nuget package (SharedCringe) (push) Successful in 4m5s
Build / Build Nuget package (CringePlugins) (push) Successful in 4m25s
Build / Build Launcher (push) Successful in 5m12s
Added options to disable launcher/plugin auto updates
Also ran cleanup
2025-06-06 01:35:09 -04:00

20 lines
580 B
C#

using System.Reflection;
using HarmonyLib;
using VRage.Scripting;
namespace CringeLauncher.Patches;
[HarmonyPatch(typeof(MyScriptWhitelist.MyWhitelistBatch), nameof(MyScriptWhitelist.MyWhitelistBatch.AllowMembers))]
public static class WhitelistAllowPatch
{
private static void Prefix(ref MemberInfo[] members)
{
if (members.Any(b => b is null))
members = [.. members.Where(b => b is { })];
}
private static Exception? Finalizer(Exception __exception)
{
return __exception is MyWhitelistException ? null : __exception;
}
}