Decompiled source of AquariumWaves v1.0.0

Mods/AquariumWaves.dll

Decompiled 2 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using AquariumWaves;
using HarmonyLib;
using Il2CppGB.Gamemodes;
using Il2CppSystem.Collections.Generic;
using MelonLoader;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(Mod), "AquariumWaves", "1.0.0", "TheUltimateNuke", null)]
[assembly: MelonGame("Boneloaf", "Gang Beasts")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyVersion("0.0.0.0")]
[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 AquariumWaves
{
	[HarmonyPatch(typeof(GameModeMapTracker), "GetMapsFor")]
	internal static class GameModeMapTrackerPatch
	{
		private static void Postfix(GameModeMapTracker __instance, GameModeEnum mode, ref List<ModeMapStatus> __result)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			if (!((Enum)mode).HasFlag((Enum)(object)(GameModeEnum)4))
			{
				return;
			}
			ModeMapStatus val = null;
			Enumerator<ModeMapStatus> enumerator = __instance.AvailableMaps.GetEnumerator();
			while (enumerator.MoveNext())
			{
				ModeMapStatus current = enumerator.Current;
				if (!(current.MapName != "Aquarium"))
				{
					val = current;
					current.AllowedModesLocal = (GameModeEnum)(current.AllowedModesLocal & 4);
				}
			}
			if (val != null && !__result.Contains(val))
			{
				__result.Add(val);
			}
		}
	}
	public class Mod : MelonMod
	{
		public static class BuildInfo
		{
			public const string Name = "AquariumWaves";

			public const string Author = "TheUltimateNuke";

			public const string Version = "1.0.0";

			public const string DownloadLink = null;
		}

		public static Instance Logger => Melon<Mod>.Logger;

		public override void OnInitializeMelon()
		{
			((MelonBase)this).LoggerInstance.Msg(ConsoleColor.Green, "Mod AquariumWaves initialized!");
		}
	}
}