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
Also ran cleanup
20 lines
580 B
C#
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;
|
|
}
|
|
} |