Decompiled source of Erenshor Speedup v1.0.0

erenshor-speedup.dll

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

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("erenshor-speedup")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("erenshor-speedup")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("6dff3742-987f-489f-998a-abb1ff1b962d")]
[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 erenshor_speedup;

[HarmonyPatch(typeof(Stats))]
[HarmonyPatch("EarnedXP")]
public class Stats_EarnedXP_Patch
{
	private static void Prefix(ref int _incomingXP)
	{
		_incomingXP = Mathf.RoundToInt(Plugin.ExperienceMultiplier.Value * (float)_incomingXP);
	}
}
[BepInPlugin("gabrielleakers.erenshor.erenshor_speedup", "Erenshor Speedup", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	public static ConfigEntry<float> ExperienceMultiplier;

	private void Awake()
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Expected O, but got Unknown
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		ExperienceMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("Experience Multiplier", "ExperienceMultiplier", 1f, new ConfigDescription("Multiplier to all experience gained (1.0x-10000x). Default: 1.0x. A game restart may be necessary for this to take effect.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10000f), Array.Empty<object>()));
		new Harmony("gabrielleakers.erenshor.erenshor_speedup").PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Erenshor Speedup loaded");
	}
}