Decompiled source of ClockSpeedPlugin v1.0.1

BepInEx/plugins/ClockSpeedPlugin/ClockSpeedPlugin.dll

Decompiled a month ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using ClockSpeedPlugin;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.6", FrameworkDisplayName = ".NET Framework 4.6")]
[assembly: AssemblyCompany("Celestial Corp")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1+71989abc3b561a98b364f530206440ad283ffcc2")]
[assembly: AssemblyProduct("ClockSpeedPlugin")]
[assembly: AssemblyTitle("ClockSpeedPlugin")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.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;
		}
	}
}
[HarmonyPatch]
public class ClockServerPatch
{
	[HarmonyPatch(typeof(ClockServer), "ConfigureServer")]
	private class ConfigureServerPatch
	{
		private static void Prefix()
		{
			Clock.multTiempo = Plugin.timeDiv.Value;
		}
	}
}
namespace ClockSpeedPlugin
{
	[BepInPlugin("com.machaceleste.clockspeedplugin", "ClockSpeedPlugin", "1.0.1")]
	public class Plugin : BaseUnityPlugin
	{
		internal static ManualLogSource Logger;

		public static ConfigEntry<int> timeDiv;

		private void Awake()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			timeDiv = ((BaseUnityPlugin)this).Config.Bind<int>("Main", "Time Divisor", 14, new ConfigDescription("Sets the speed the clock runs at, must be set before singleplayer launches, default: 14:1", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 32), Array.Empty<object>()));
			Logger = ((BaseUnityPlugin)this).Logger;
			Logger.LogInfo((object)"Plugin ClockSpeedPlugin is loaded!");
			new Harmony("com.machaceleste.clockspeedplugin").PatchAll();
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "ClockSpeedPlugin";

		public const string PLUGIN_NAME = "ClockSpeedPlugin";

		public const string PLUGIN_VERSION = "1.0.1";
	}
}