Decompiled source of Buttered Lillys Tome Of Sex v1.0.1

Tome_Of_Sex.dll

Decompiled a year ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using MelonLoader;
using Microsoft.CodeAnalysis;
using Tome_Of_Sex;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(MelonLoad), "Tome Of Sex", "4.0.1", "Lilly", null)]
[assembly: MelonGame("KisSoft", "ATLYSS")]
[assembly: MelonOptionalDependencies(new string[] { "BepInEx" })]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Tome_Of_Sex")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+3e046a910e4205da0d6cbad9eaffa6a3b25e4d25")]
[assembly: AssemblyProduct("Tome_Of_Sex")]
[assembly: AssemblyTitle("Tome_Of_Sex")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[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 Tome_Of_Sex
{
	[BepInPlugin("34b14918-2658-4721-a341-9b846ea8ded8", "Tome Of Sex", "1.0.0")]
	public class Bepin : BaseUnityPlugin
	{
		private Tome_Of_Sex_Core core;

		public void Awake()
		{
			if (!((Object)(object)Tome_Of_Sex_Core.TOSInstance != (Object)null))
			{
				GameObject val = Object.Instantiate<GameObject>(GameObject.CreatePrimitive((PrimitiveType)3));
				((Object)val).hideFlags = (HideFlags)61;
				core = val.AddComponent<Tome_Of_Sex_Core>();
				core.Logger = logger;
			}
		}

		public bool logger(string mesg)
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)(mesg ?? ""));
			return true;
		}
	}
	public class Tome_Of_Sex_Core : MonoBehaviour
	{
		[HarmonyPatch(typeof(ItemToolTip), "Apply_ItemStats")]
		public static class unCapSlider
		{
			private static void Postfix(ref ItemToolTip __instance)
			{
				try
				{
					if (((TooltipElement)__instance)._toolTipName.text.Contains("Experience"))
					{
						((TooltipElement)__instance)._toolTipName.text = ((TooltipElement)__instance)._toolTipName.text.Replace("Experience", "Sex");
					}
				}
				catch (Exception ex)
				{
					TOSInstance.Logger(ex.ToString());
				}
			}
		}

		public static Tome_Of_Sex_Core TOSInstance;

		public Func<string, bool> Logger;

		private void Start()
		{
			TOSInstance = this;
		}
	}
	public class MelonLoad : MelonMod
	{
		private Tome_Of_Sex_Core core;

		public override void OnInitializeMelon()
		{
			if (!((Object)(object)Tome_Of_Sex_Core.TOSInstance != (Object)null))
			{
				GameObject val = Object.Instantiate<GameObject>(GameObject.CreatePrimitive((PrimitiveType)3));
				((Object)val).hideFlags = (HideFlags)61;
				core = val.AddComponent<Tome_Of_Sex_Core>();
				core.Logger = logger;
			}
		}

		public bool logger(string msg)
		{
			MelonLogger.Msg(msg);
			return true;
		}
	}
}