using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; 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("AlwaysSunny")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("AlwaysSunny")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("6a1c0559-40ac-48ea-b95a-49abbaca39f6")] [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 AlwaysSunny; [BepInPlugin("com.yourname.alwayssunny", "Always Sunny", "1.0.0")] public class Plugin : BaseUnityPlugin { private readonly Harmony harmony = new Harmony("com.yourname.alwayssunny"); private void Awake() { harmony.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Always Sunny loaded!"); } } [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatch { [HarmonyPatch("SetPlanetsWeather")] [HarmonyPostfix] private static void ForceSunnyWeather(StartOfRound __instance) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance == (Object)null || __instance.levels == null) { return; } SelectableLevel[] levels = __instance.levels; foreach (SelectableLevel val in levels) { if (!((Object)(object)val == (Object)null)) { val.currentWeather = (LevelWeatherType)(-1); } } Debug.Log((object)"[AlwaysSunny] All moons set to sunny."); } }