using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("EclipseOnly")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EclipseOnly")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("fca99bae-d488-4383-a7da-64582eda6f77")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace EclipseOnly
{
[BepInPlugin("stormytuna.EclipseOnly", "EclipseOnly", "1.0.0")]
public class EclipseOnlyBase : BaseUnityPlugin
{
public const string ModGUID = "stormytuna.EclipseOnly";
public const string ModName = "EclipseOnly";
public const string ModVersion = "1.0.0";
public static ManualLogSource Log = Logger.CreateLogSource("stormytuna.EclipseOnly");
public static EclipseOnlyBase Instance;
private readonly Harmony harmony = new Harmony("stormytuna.EclipseOnly");
private void Awake()
{
if (Instance == null)
{
Instance = this;
}
Log.LogInfo((object)"Eclipse Only has awoken!");
harmony.PatchAll();
}
}
}
namespace EclipseOnly.Patches
{
[HarmonyPatch(typeof(StartOfRound))]
public class StartOfRoundPatch
{
[HarmonyPrefix]
[HarmonyPatch("SetPlanetsWeather")]
public static bool MakePlanetsEclipsed(SelectableLevel[] ___levels)
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
foreach (SelectableLevel val in ___levels)
{
val.currentWeather = (LevelWeatherType)5;
}
return false;
}
}
}