Decompiled source of MakeSecretsUncollected v1.0.0

MakeSecretsUncollected.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("MakeSecretsUncollected")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MakeSecretsUncollected")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("B2F369FD-07AF-4F27-8C20-5C5F55691261")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace MakeSecretsUncollected;

[HarmonyPatch(typeof(Bonus))]
public static class BonusPatch
{
	[HarmonyPostfix]
	[HarmonyPatch(typeof(Bonus), "Start")]
	public static void Bonus_Start_Postfix(Bonus __instance)
	{
		__instance.ghost = __instance.beenFound || (__instance.secretNumber >= 0 && MonoSingleton<StatsManager>.Instance.newSecrets.Contains(__instance.secretNumber));
	}

	[HarmonyPrefix]
	[HarmonyPatch(typeof(Bonus), "BeenFound")]
	public static bool Bonus_BeenFound_Prefix()
	{
		return false;
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(Bonus), "OnTriggerEnter")]
	public static void Bonus_OnTriggerEnter_Postfix(Bonus __instance, Collider other, bool ___activated)
	{
		if (!(!((Component)other).gameObject.CompareTag("Player") || ___activated) && __instance.ghost)
		{
			MonoSingleton<TimeController>.Instance.ParryFlash();
		}
	}
}
[BepInProcess("ULTRAKILL.exe")]
[BepInPlugin("dev.flazhik.bs.make-secrets-uncollected", "MakeSecretsUncollected", "1.0.0")]
public class MakeSecretsUncollected : BaseUnityPlugin
{
	private Harmony _harmony;

	private void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Expected O, but got Unknown
		_harmony = new Harmony("dev.flazhik.bs.make-secrets-uncollected");
		_harmony.PatchAll();
	}
}
internal static class PluginInfo
{
	public const string GUID = "dev.flazhik.bs.make-secrets-uncollected";

	public const string NAME = "MakeSecretsUncollected";

	public const string VERSION = "1.0.0";
}