Decompiled source of Defeat the Gungeon v157.157.157

DefeatTheGungeon.dll

Decompiled a year ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("DefeatTheGungeon")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("N/A")]
[assembly: AssemblyProduct("DefeatTheGungeon")]
[assembly: AssemblyCopyright("Copyright © N/A 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c6e7d268-054b-4493-94c6-88b6c6350eee")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace DefeatTheGungeon;

[BepInPlugin("spapi.etg.defeatthegungeon", "Defeat the Gungeon", "157.157.157")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[HarmonyPatch]
public class Plugin : BaseUnityPlugin
{
	public const string GUID = "spapi.etg.defeatthegungeon";

	public const string NAME = "Defeat the Gungeon";

	public const string VERSION = "157.157.157";

	public static Texture2D FUCK;

	public void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Expected O, but got Unknown
		Harmony val = new Harmony("spapi.etg.defeatthegungeon");
		val.PatchAll();
		FUCK = new Texture2D(1, 1, (TextureFormat)4, false);
		ImageConversion.LoadImage(FUCK, new byte[1774]
		{
			137, 80, 78, 71, 13, 10, 26, 10, 0, 0,
			0, 13, 73, 72, 68, 82, 0, 0, 1, 180,
			0, 0, 0, 139, 8, 6, 0, 0, 0, 9,
			111, 108, 138, 0, 0, 0, 1, 115, 82, 71,
			66, 0, 174, 206, 28, 233, 0, 0, 6, 168,
			73, 68, 65, 84, 120, 156, 237, 221, 221, 82,
			234, 72, 20, 6, 208, 112, 74, 177, 244, 253,
			159, 213, 42, 189, 113, 174, 152, 113, 56, 144,
			31, 72, 210, 187, 191, 172, 85, 53, 55, 142,
			64, 239, 206, 238, 243, 153, 38, 129, 211, 235,
			249, 125, 24, 134, 225, 103, 0, 128, 126, 157,
			254, 12, 194, 12, 128, 254, 253, 252, 105, 61,
			2, 0, 88, 131, 64, 3, 32, 130, 64, 3,
			32, 130, 64, 3, 32, 130, 64, 3, 32, 194,
			203, 212, 47, 124, 127, 125, 238, 49, 14, 58,
			114, 126, 251, 248, 235, 103, 115, 251, 228, 247,
			99, 231, 60, 230, 242, 251, 91, 245, 225, 163,
			181, 60, 251, 184, 173, 235, 89, 251, 249, 159,
			57, 230, 149, 94, 131, 254, 221, 234, 147, 139,
			209, 51, 52, 205, 196, 45, 207, 244, 69, 74,
			79, 93, 215, 145, 82, 215, 61, 45, 234, 75,
			159, 83, 30, 51, 214, 23, 182, 28, 217, 93,
			202, 63, 84, 151, 58, 82, 234, 153, 114, 148,
			58, 233, 151, 64, 163, 137, 148, 127, 28, 83,
			234, 152, 235, 104, 245, 210, 23, 129, 6, 64,
			4, 129, 6, 64, 132, 201, 171, 28, 1, 158,
			53, 118, 101, 26, 172, 69, 160, 193, 129, 45,
			189, 141, 2, 42, 19, 104, 192, 230, 30, 189,
			183, 15, 150, 240, 30, 26, 0, 17, 156, 161,
			17, 229, 116, 58, 13, 195, 48, 12, 63, 63,
			25, 95, 243, 183, 117, 61, 182, 25, 73, 226,
			12, 13, 128, 8, 2, 13, 152, 205, 251, 92,
			84, 102, 203, 145, 40, 41, 91, 141, 23, 149,
			234, 17, 102, 84, 231, 12, 13, 128, 8, 206,
			208, 128, 89, 190, 191, 62, 31, 62, 75, 115,
			118, 199, 30, 70, 207, 208, 52, 33, 240, 155,
			171, 34, 105, 109, 44, 151, 38, 207, 208, 206,
			111, 31, 154, 24, 120, 138, 27, 171, 89, 195,
			84, 143, 204, 122, 15, 77, 163, 65, 166, 243,
			219, 199, 191, 255, 65, 101, 115, 122, 116, 246,
			69, 33, 26, 158, 103, 165, 244, 208, 189, 58,
			82, 234, 131, 106, 230, 174, 173, 63, 195, 48,
			156, 214, 126, 82, 184, 39, 165, 135, 174, 235,
			72, 169, 11, 170, 89, 178, 182, 46, 103, 104,
			66, 141, 221, 164, 244, 208, 165, 142, 148, 122,
			160, 154, 165, 107, 235, 247, 150, 163, 80, 99,
			150, 53, 142, 127, 74, 15, 165, 212, 81, 145,
			185, 61, 182, 71, 142, 255, 233, 245, 252, 126,
			253, 179, 58, 31, 77, 0, 0, 51, 221, 186,
			40, 100, 246, 153, 26, 0, 84, 113, 239, 42,
			71, 161, 6, 64, 87, 198, 46, 219, 23, 106,
			0, 116, 99, 234, 62, 52, 161, 6, 64, 23,
			230, 220, 88, 45, 212, 0, 40, 207, 215, 199,
			0, 16, 97, 78, 160, 185, 140, 31, 128, 242,
			166, 2, 77, 152, 1, 208, 133, 177, 64, 19,
			102, 0, 116, 227, 222, 247, 161, 77, 134, 89,
			79, 223, 145, 182, 228, 35, 84, 142, 80, 215,
			173, 199, 109, 85, 119, 133, 185, 95, 250, 17,
			58, 169, 61, 48, 12, 125, 213, 182, 84, 242,
			92, 84, 169, 173, 250, 122, 190, 117, 134, 22,
			21, 102, 195, 208, 223, 120, 247, 86, 97, 126,
			182, 28, 195, 146, 231, 174, 48, 23, 75, 36,
			215, 182, 84, 242, 92, 244, 86, 91, 171, 245,
			124, 29, 104, 113, 97, 118, 209, 235, 184, 123,
			215, 211, 188, 247, 52, 214, 223, 122, 29, 119,
			43, 189, 206, 87, 133, 113, 87, 24, 195, 152,
			223, 129, 22, 27, 102, 23, 189, 143, 159, 237,
			244, 222, 27, 189, 143, 127, 47, 189, 207, 83,
			239, 227, 223, 218, 229, 61, 180, 248, 48, 187,
			248, 254, 250, 28, 221, 131, 189, 254, 127, 149,
			235, 94, 50, 182, 150, 95, 197, 49, 53, 231,
			173, 85, 62, 198, 75, 84, 159, 231, 214, 28,
			231, 140, 215, 31, 51, 235, 198, 234, 148, 70,
			184, 72, 171, 135, 199, 165, 245, 66, 90, 61,
			107, 73, 155, 151, 180, 122, 214, 50, 25, 104,
			169, 19, 151, 90, 87, 85, 21, 231, 187, 226,
			152, 214, 144, 90, 215, 163, 82, 231, 163, 101,
			93, 85, 231, 116, 52, 208, 170, 14, 122, 45,
			233, 245, 113, 95, 250, 177, 79, 175, 111, 174,
			244, 121, 72, 175, 111, 169, 123, 247, 161, 29,
			86, 79, 13, 178, 230, 125, 104, 123, 168, 188,
			247, 14, 44, 83, 113, 61, 251, 112, 98, 0,
			34, 8, 52, 0, 34, 8, 52, 118, 213, 211,
			150, 46, 48, 174, 218, 122, 22, 104, 0, 68,
			16, 104, 236, 174, 218, 95, 117, 192, 227, 42,
			173, 103, 129, 6, 64, 4, 129, 6, 64, 4,
			129, 70, 19, 149, 182, 41, 128, 231, 84, 89,
			207, 2, 13, 128, 8, 2, 13, 128, 8, 2,
			141, 102, 170, 108, 83, 0, 207, 171, 176, 158,
			5, 26, 0, 17, 4, 26, 77, 85, 248, 171,
			14, 88, 71, 235, 245, 44, 208, 0, 136, 32,
			208, 104, 174, 245, 95, 117, 192, 122, 90, 174,
			103, 129, 6, 64, 4, 129, 6, 64, 4, 129,
			6, 64, 4, 129, 6, 64, 132, 67, 7, 218,
			249, 237, 163, 245, 16, 96, 19, 183, 122, 59,
			189, 223, 211, 235, 99, 218, 75, 235, 1, 92,
			104, 70, 82, 85, 234, 237, 74, 99, 129, 181,
			149, 56, 67, 179, 200, 72, 165, 183, 97, 63,
			37, 2, 13, 0, 158, 37, 208, 0, 136, 80,
			230, 61, 180, 107, 123, 220, 109, 110, 59, 136,
			22, 90, 246, 118, 242, 167, 178, 88, 207, 148,
			60, 67, 219, 107, 209, 37, 47, 110, 106, 106,
			217, 219, 233, 253, 158, 94, 31, 211, 74, 6,
			26, 0, 44, 37, 208, 0, 136, 32, 208, 0,
			136, 32, 208, 0, 136, 32, 208, 0, 136, 32,
			208, 0, 136, 32, 208, 0, 136, 32, 208, 0,
			136, 32, 208, 0, 136, 32, 208, 0, 136, 32,
			208, 0, 136, 32, 208, 0, 136, 32, 208, 0,
			136, 32, 208, 0, 136, 32, 208, 0, 136, 32,
			208, 0, 136, 32, 208, 0, 136, 32, 208, 0,
			136, 32, 208, 0, 136, 32, 208, 0, 136, 32,
			208, 0, 136, 32, 208, 0, 136, 32, 208, 0,
			136, 32, 208, 0, 136, 48, 26, 104, 231, 183,
			143, 205, 7, 112, 235, 53, 246, 120, 221, 61,
			95, 167, 186, 244, 121, 104, 213, 99, 213, 122,
			219, 113, 206, 163, 230, 255, 59, 189, 158, 223,
			135, 97, 24, 126, 118, 27, 13, 0, 108, 192,
			150, 35, 0, 17, 4, 26, 0, 17, 4, 26,
			0, 17, 94, 166, 126, 225, 251, 235, 115, 143,
			113, 52, 113, 235, 205, 197, 158, 234, 93, 242,
			230, 239, 239, 186, 122, 175, 123, 169, 123, 243,
			164, 230, 44, 106, 254, 207, 17, 107, 30, 134,
			137, 51, 180, 228, 73, 25, 134, 252, 250, 230,
			74, 159, 135, 91, 245, 169, 57, 143, 154, 239,
			255, 44, 201, 88, 125, 182, 28, 1, 136, 32,
			208, 216, 84, 250, 61, 49, 112, 36, 213, 215,
			179, 64, 59, 128, 244, 45, 8, 128, 97, 16,
			104, 0, 132, 16, 104, 87, 170, 159, 82, 63,
			171, 69, 125, 233, 115, 10, 71, 82, 121, 61,
			11, 180, 78, 205, 109, 42, 219, 141, 192, 81,
			8, 52, 118, 81, 249, 175, 58, 96, 153, 170,
			235, 89, 160, 221, 80, 245, 96, 61, 43, 181,
			46, 128, 97, 16, 104, 93, 18, 76, 0, 127,
			19, 104, 193, 170, 189, 127, 38, 136, 33, 71,
			197, 245, 44, 208, 238, 168, 120, 176, 134, 225,
			241, 139, 65, 170, 214, 3, 176, 22, 129, 198,
			174, 4, 43, 228, 168, 182, 158, 5, 218, 136,
			106, 7, 203, 217, 25, 192, 125, 2, 109, 66,
			111, 97, 32, 204, 128, 163, 18, 104, 157, 152,
			19, 76, 213, 46, 2, 185, 71, 200, 66, 142,
			74, 235, 89, 160, 205, 208, 250, 128, 61, 26,
			102, 173, 199, 13, 176, 39, 129, 54, 83, 171,
			112, 72, 13, 179, 234, 227, 3, 230, 171, 178,
			158, 5, 218, 2, 123, 31, 180, 212, 48, 3,
			216, 130, 64, 91, 104, 175, 176, 16, 102, 0,
			203, 148, 14, 180, 170, 255, 56, 111, 61, 174,
			169, 231, 255, 254, 250, 140, 8, 179, 222, 198,
			187, 166, 35, 215, 78, 166, 10, 61, 61, 26,
			104, 45, 7, 88, 97, 114, 198, 156, 223, 62,
			54, 25, 227, 216, 115, 142, 5, 89, 245, 249,
			170, 70, 111, 31, 67, 250, 92, 167, 215, 183,
			212, 228, 25, 154, 47, 132, 28, 183, 230, 88,
			111, 61, 215, 37, 196, 238, 93, 146, 223, 211,
			92, 221, 114, 180, 96, 233, 253, 120, 245, 40,
			117, 206, 43, 214, 213, 122, 76, 47, 115, 126,
			233, 252, 246, 177, 219, 61, 78, 173, 39, 228,
			17, 151, 49, 63, 59, 71, 75, 30, 223, 227,
			60, 85, 164, 183, 143, 97, 207, 227, 188, 7,
			189, 116, 219, 229, 12, 237, 52, 245, 139, 123,
			76, 96, 239, 7, 105, 143, 173, 63, 219, 139,
			235, 211, 219, 199, 144, 114, 12, 82, 234, 216,
			194, 239, 45, 199, 166, 161, 150, 116, 144, 46,
			161, 179, 86, 77, 107, 63, 95, 53, 21, 234,
			210, 219, 199, 208, 251, 177, 232, 97, 252, 45,
			199, 120, 122, 61, 191, 95, 255, 236, 103, 234,
			65, 107, 159, 186, 207, 185, 170, 111, 11, 45,
			38, 126, 78, 45, 85, 199, 181, 212, 146, 58,
			182, 220, 14, 106, 57, 142, 106, 189, 157, 180,
			237, 118, 173, 74, 191, 109, 165, 117, 125, 173,
			95, 127, 206, 56, 110, 5, 218, 48, 204, 8,
			53, 0, 168, 228, 222, 85, 142, 147, 219, 143,
			0, 80, 201, 216, 101, 251, 66, 13, 128, 110,
			76, 221, 135, 38, 212, 0, 232, 194, 156, 143,
			190, 18, 106, 0, 148, 55, 247, 179, 28, 133,
			26, 0, 165, 45, 249, 112, 98, 161, 6, 64,
			85, 167, 127, 0, 171, 10, 57, 48, 167, 229,
			12, 177, 0, 0, 0, 0, 73, 69, 78, 68,
			174, 66, 96, 130
		});
		((Texture)FUCK).filterMode = (FilterMode)0;
	}

	public void Update()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		Scene activeScene = SceneManager.GetActiveScene();
		if (!string.IsNullOrEmpty(((Scene)(ref activeScene)).name))
		{
			bool flag = ((Scene)(ref activeScene)).name == "tt_foyer";
			bool flag2 = ((Scene)(ref activeScene)).name == "LoadingDungeon";
			if (!(flag2 || flag) || (GameManager.HasInstance && ((GameManager.Instance.AllPlayers != null && GameManager.Instance.AllPlayers.Length != 0) || !(flag ? Foyer.DoMainMenu : ((Object)(object)GameManager.Instance.Dungeon == (Object)null)))))
			{
				Crash();
			}
		}
	}

	public void Crash()
	{
		Application.Quit();
	}

	[HarmonyPatch(typeof(MainMenuFoyerController), "Awake")]
	[HarmonyPatch(typeof(MainMenuFoyerController), "InitializeMainMenu")]
	[HarmonyPostfix]
	public static void DEFEAT(MainMenuFoyerController __instance)
	{
		List<dfButton> list = new List<dfButton> { __instance.ControlsButton, __instance.NewGameButton, __instance.ContinueGameButton, __instance.XboxLiveButton };
		foreach (dfButton item in list)
		{
			((Component)item).gameObject.SetActive(false);
			((dfControl)item).IsInteractive = false;
			AccessTools.Field(typeof(dfButton), "Click").SetValue(item, null);
		}
		((Component)__instance.ControlsButton).gameObject.SetActive(false);
		((Component)__instance.NewGameButton).gameObject.SetActive(false);
		((Component)__instance.ContinueGameButton).gameObject.SetActive(false);
		((Component)__instance.XboxLiveButton).gameObject.SetActive(false);
		__instance.VersionLabel.Text = "get fooled idiot";
		GameObject val = Object.Instantiate<GameObject>(((Component)__instance.TitleCard).gameObject, ((Component)__instance.TitleCard).transform.parent);
		val.GetComponent<dfTextureSprite>().Texture = (Texture)(object)FUCK;
		((Component)__instance.TitleCard).gameObject.SetActive(false);
	}

	[HarmonyPatch(typeof(TitleDioramaController), "Start")]
	[HarmonyPostfix]
	public static void HHHH(TitleDioramaController __instance)
	{
		((Component)__instance.Eyeholes).gameObject.SetActive(false);
		((Component)((Component)__instance).transform.Find("Island")).gameObject.SetActive(false);
		((Component)((Component)__instance).transform.Find("dragun")).gameObject.SetActive(false);
		((Component)((Component)__instance).transform.Find("LichXform")).gameObject.SetActive(false);
		((Component)((Component)__instance).transform.Find("paths 4")).gameObject.SetActive(true);
	}

	[HarmonyPatch(typeof(FinalIntroSequenceManager), "QuickStartAvailable")]
	[HarmonyPrefix]
	public static bool AAAAAAAAAAAAAAAAAAA(ref bool __result)
	{
		return __result = false;
	}

	[HarmonyPatch(typeof(MainMenuFoyerController), "OnNewGameSelected")]
	[HarmonyPatch(typeof(MainMenuFoyerController), "OnContinueGameSelected")]
	[HarmonyPatch(typeof(MainMenuFoyerController), "ShowOptionsPanel")]
	[HarmonyPatch(typeof(MainMenuFoyerController), "NewGameInternal")]
	[HarmonyPrefix]
	public static bool AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA()
	{
		return false;
	}
}