using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using HarmonyLib;
using LabFusion.Representation;
using MelonLoader;
using Microsoft.CodeAnalysis;
using NoFusionBackdoor;
using YesFusionBackdoor;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("Prevents NoFusionBackdoor from removing Fusion's Backdoor")]
[assembly: AssemblyDescription("Prevents NoFusionBackdoor from removing Fusion's Backdoor")]
[assembly: AssemblyCompany("Vega Van Dam")]
[assembly: AssemblyProduct("YesFusionBackdoor")]
[assembly: AssemblyCopyright("Developed by Vega Van Dam")]
[assembly: AssemblyTrademark("Vega Van Dam")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: MelonInfo(typeof(Main), "YesFusionBackdoor", "1.0.0", "Vega Van Dam", null)]
[assembly: MelonColor(255, 255, 255, 255)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace YesFusionBackdoor
{
public class Main : MelonMod
{
[HarmonyPatch(typeof(Main))]
public static class VerifyIfUnpatched
{
[HarmonyPostfix]
[HarmonyPatch("VerifyPlayerPrefix")]
public static void DidItEvenWork()
{
Logger.Error("If you see this, it didn't work.");
}
}
internal const string Name = "YesFusionBackdoor";
internal const string Description = "Prevents NoFusionBackdoor from removing Fusion's Backdoor";
internal const string Author = "Vega Van Dam";
internal const string Company = "Vega Van Dam";
internal const string Version = "1.0.0";
internal const string DownloadLink = null;
internal static Instance Logger;
public override void OnInitializeMelon()
{
Logger = ((MelonBase)this).LoggerInstance;
}
public override void OnLateInitializeMelon()
{
MelonMod val = null;
foreach (MelonMod registeredMelon in MelonTypeBase<MelonMod>.RegisteredMelons)
{
if (!(((MelonBase)registeredMelon).Info.Name != "NoFusionBackdoor"))
{
val = registeredMelon;
break;
}
}
string id = ((MelonBase)val).HarmonyInstance.Id;
MethodInfo method = typeof(FusionMasterList).GetMethod("VerifyPlayer", BindingFlags.Static | BindingFlags.Public);
foreach (Patch prefix in Harmony.GetPatchInfo((MethodBase)method).Prefixes)
{
if (prefix.owner == id)
{
((MelonBase)this).HarmonyInstance.Unpatch((MethodBase)method, (HarmonyPatchType)1, id);
}
}
}
}
}