Decompiled source of MoreStableSnowStorm v1.0.1

StableSnowStorm.dll

Decompiled 4 days ago
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.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("StableSnowStorm")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("StableSnowStorm")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("a0e2af4c-c3cb-44ad-b0e2-183aa1acbeb4")]
[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 StableSnowStorm.MoreStableSnowStorm;

[BepInPlugin("MoreStableSnowStorm", "MoreStableSnowStorm_SlimeYuri", "1.0.0")]
public class MoreStableSnowStorm : BaseUnityPlugin
{
	private static ConfigEntry<float> MinPeaceTime;

	private static ConfigEntry<float> MaxPeaceTime;

	private void Start()
	{
		Harmony.CreateAndPatchAll(typeof(MoreStableSnowStorm), (string)null);
		MinPeaceTime = ((BaseUnityPlugin)this).Config.Bind<float>("Minimum interval of snowstorm❄\ufe0f暴风雪间隔最小值", "MinTime", 60f, "The snowstorm will randomly select a value between MinTime and MaxTime to determine the time when the next snowstorm will arrive(Second).❄\ufe0f暴风雪会在MinTime和MaxTime之间随机取一个值来决定下一次暴风雪到来的时间(秒)");
		MaxPeaceTime = ((BaseUnityPlugin)this).Config.Bind<float>("Maximum interval of snowstorm❄\ufe0f暴风雪间隔最大值", "MaxTime", 120f, "The snowstorm will randomly select a value between MinTime and MaxTime to determine the time when the next snowstorm will arrive(Second).❄\ufe0f暴风雪会在MinTime和MaxTime之间随机取一个值来决定下一次暴风雪到来的时间(秒)");
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(WindChillZone), "GetNextWindTime")]
	public static void GetNextWindTime_Postfix(ref bool windActive, ref float __result)
	{
		if (!windActive)
		{
			__result = Random.Range(MinPeaceTime.Value, MaxPeaceTime.Value);
		}
	}
}