Decompiled source of AmazingGraceJester v1.0.0

AmazingGraceJester.dll

Decompiled 7 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using LCSoundTool;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("AmazingGraceJester")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Audio Replacement for The Jester")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("AmazingGraceJester")]
[assembly: AssemblyTitle("AmazingGraceJester")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace AmazingGraceJester;

[HarmonyPatch(typeof(JesterAI), "Start")]
internal class JesterStartPatch
{
	private static void Postfix(JesterAI __instance)
	{
		__instance.popGoesTheWeaselTheme = Plugin.replacementAudio;
	}
}
[BepInPlugin("AmazingGraceJester", "AmazingGraceJester", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
	public static AudioClip replacementAudio;

	private void Awake()
	{
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Expected O, but got Unknown
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Loading a mod by swAAn\n\n                                    _\n                                ,-\"\" \"\".\n                              ,'  ____  `.\n                            ,'  ,'    `.  `._\n   (`.         _..--.._   ,'  ,'        \\    \\\n  (`-.\\    .-\"\"        \"\"'   /          (  d _b\n (`._  `-\"\" ,._             (            `-(   \\\n <_  `     (  <`<            \\              `-._\\\n  <`-       (__< <           :\n   (__        (_<_<          ;\n    `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
		replacementAudio = SoundTool.GetAudioClip("swAAn-AmazingGraceJester", "firstsound.wav");
		Harmony val = new Harmony("AmazingGraceJester");
		val.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin AmazingGraceJester is loaded!");
	}
}
public static class PluginInfo
{
	public const string PLUGIN_GUID = "AmazingGraceJester";

	public const string PLUGIN_NAME = "AmazingGraceJester";

	public const string PLUGIN_VERSION = "1.0.0";
}