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 FloodedOnly.Patches;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("FloodedOnly")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.1.2.0")]
[assembly: AssemblyInformationalVersion("1.1.2+c627b4acd525c096650207281c71569ba62e945f")]
[assembly: AssemblyProduct("A Mod for a Swim")]
[assembly: AssemblyTitle("FloodedOnly")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.2.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;
}
}
}
namespace FloodedOnly
{
[BepInPlugin("FloodedOnly", "Floodedonly", "1.1.2")]
public class Plugin : BaseUnityPlugin
{
private const string PLUGIN_GUID = "FloodedOnly";
private const string PLUGIN_NAME = "Floodedonly";
private const string PLUGIN_VERSION = "1.1.2";
private readonly Harmony harmony = new Harmony("FloodedOnly");
private void Awake()
{
Debug.Log((object)"I am a Cowboy");
harmony.PatchAll(typeof(Flood));
harmony.PatchAll(typeof(NewFlooded));
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "FloodedOnly";
public const string PLUGIN_NAME = "A Mod for a Swim";
public const string PLUGIN_VERSION = "1.1.2";
}
}
namespace FloodedOnly.Patches
{
public class Flood
{
[HarmonyPatch(typeof(StartOfRound), "SetPlanetsWeather")]
[HarmonyPrefix]
public static bool SetPlanetsWeather(StartOfRound __instance)
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
SelectableLevel[] levels = __instance.levels;
foreach (SelectableLevel val in levels)
{
val.currentWeather = (LevelWeatherType)4;
Debug.Log((object)("SetPlanetsWeather: " + val.PlanetName + ((object)(LevelWeatherType)(ref val.currentWeather)).ToString()));
}
return false;
}
}
public class NewFlooded
{
[HarmonyPatch(typeof(FloodWeather), "OnEnable")]
[HarmonyPrefix]
public static void SetToCurrentLevelWeather()
{
if (TimeOfDay.Instance.currentLevel.levelID == 9)
{
TimeOfDay.Instance.currentWeatherVariable = 0f;
Debug.Log((object)"Lets Try");
}
if (TimeOfDay.Instance.currentLevel.levelID == 12)
{
TimeOfDay.Instance.currentWeatherVariable = 0f;
Debug.Log((object)"Lets Try");
}
if (TimeOfDay.Instance.currentLevel.levelID == 6)
{
TimeOfDay.Instance.currentWeatherVariable = -18f;
Debug.Log((object)"Lets Try");
}
}
[HarmonyPatch(typeof(FloodWeather), "OnGlobalTimeSync")]
[HarmonyPrefix]
public static void SetSync()
{
if (TimeOfDay.Instance.currentLevel.levelID == 9)
{
TimeOfDay.Instance.currentWeatherVariable2 = 3f;
Debug.Log((object)"Lets Try");
}
if (TimeOfDay.Instance.currentLevel.levelID == 12)
{
TimeOfDay.Instance.currentWeatherVariable2 = 1f;
Debug.Log((object)"Lets Try");
}
if (TimeOfDay.Instance.currentLevel.levelID == 6)
{
TimeOfDay.Instance.currentWeatherVariable2 = 3f;
Debug.Log((object)"Lets Try");
}
}
[HarmonyPatch(typeof(FloodWeather), "Update")]
[HarmonyPrefix]
public static void Update()
{
if (TimeOfDay.Instance.currentLevel.levelID == 9)
{
TimeOfDay.Instance.currentWeatherVariable = 0f;
TimeOfDay.Instance.currentWeatherVariable2 = 3f;
}
if (TimeOfDay.Instance.currentLevel.levelID == 12)
{
TimeOfDay.Instance.currentWeatherVariable = 0f;
TimeOfDay.Instance.currentWeatherVariable2 = 1f;
}
if (TimeOfDay.Instance.currentLevel.levelID == 6)
{
TimeOfDay.Instance.currentWeatherVariable = -18f;
TimeOfDay.Instance.currentWeatherVariable2 = 3f;
}
}
}
}