Decompiled source of SandboxGamemodeSandboxLinkForFusion v1.1.0

Mods/SandboxGamemode.dll

Decompiled 2 days ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using LabFusion.Menu;
using LabFusion.Menu.Data;
using LabFusion.SDK.Gamemodes;
using LabFusion.SDK.Modules;
using LabFusion.UI.Popups;
using MelonLoader;
using Microsoft.CodeAnalysis;
using SandboxGamemode;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(Core), "SandboxGamemode", "1.0.0", "The Static Squad", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("SandboxGamemode")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SandboxGamemode")]
[assembly: AssemblyTitle("SandboxGamemode")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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 SandboxGamemode
{
	public class Core : MelonMod
	{
		public override void OnInitializeMelon()
		{
			ModuleManager.LoadModules(((MelonBase)this).MelonAssembly.Assembly);
			((MelonBase)this).LoggerInstance.Msg("Initialized.");
		}
	}
	public class SandboxModule : Module
	{
		public override string Name => "Sandbox by The Static Squad";

		public override string Author => "The Static Squad";

		public override Version Version => new Version(0, 1, 0);

		public override ConsoleColor Color => ConsoleColor.Cyan;

		protected override void OnModuleRegistered()
		{
			GamemodeRegistration.LoadGamemodes(Assembly.GetExecutingAssembly());
			ModuleMessageManager.LoadHandlers(Assembly.GetExecutingAssembly());
			MelonLogger.Msg("FordRoyale gamemode registered with Fusion!", new object[1] { ConsoleColor.White });
		}
	}
	public class SandboxGamemode : Gamemode
	{
		public override string Title => "The Static Squad Sandbox Gamemode";

		public override string Author => "The Static Squad";

		public override string Description => "Sandbox!";

		public override Texture Logo => MenuResources.GetGamemodeIcon("Deathmatch");

		public override bool DisableDevTools => false;

		public override bool DisableSpawnGun => false;

		public override bool DisableManualUnragdoll => false;

		public override GroupElementData CreateSettingsGroup()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Expected O, but got Unknown
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Expected O, but got Unknown
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Expected O, but got Unknown
			GroupElementData val = ((Gamemode)this).CreateSettingsGroup();
			GroupElementData val2 = new GroupElementData("General");
			val.AddElement<GroupElementData>(val2);
			IntElementData val3 = new IntElementData
			{
				Title = "Round Minutes",
				Value = 69420,
				Increment = 1,
				MinValue = 69420,
				MaxValue = 69420
			};
			val2.AddElement<IntElementData>(val3);
			IntElementData val4 = new IntElementData
			{
				Title = "Minimum Players",
				Value = 69420,
				Increment = 1,
				MinValue = 1,
				MaxValue = 255
			};
			val2.AddElement<IntElementData>(val4);
			FloatElementData val5 = new FloatElementData
			{
				Title = "Vitality",
				Value = 69420f,
				Increment = 0.2f,
				MinValue = 0.2f,
				MaxValue = 100f
			};
			val2.AddElement<FloatElementData>(val5);
			return val;
		}

		public override void OnGamemodeRegistered()
		{
		}

		public override void OnGamemodeUnregistered()
		{
		}

		public override bool CheckReadyConditions()
		{
			return true;
		}

		public override void OnGamemodeStarted()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			((Gamemode)this).OnGamemodeStarted();
			Notifier.Send(new Notification
			{
				Title = NotificationText.op_Implicit("Sandbox Started"),
				Message = NotificationText.op_Implicit("Good luck!"),
				SaveToMenu = false,
				ShowPopup = true
			});
		}

		public override void OnLevelReady()
		{
		}

		public override void OnGamemodeStopped()
		{
		}

		public float GetTimeElapsed()
		{
			return 65535f;
		}

		public float GetMinutesLeft()
		{
			return 65535f;
		}

		protected override void OnUpdate()
		{
		}
	}
}