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 BepInEx.Configuration;
using BepInEx.Logging;
using GDOD.patches;
using GameNetcodeStuff;
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("GDOD")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Your Mod Description Goes Here")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("GDOD")]
[assembly: AssemblyTitle("GDOD")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.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 GDOD
{
[BepInPlugin("org.agmas.GDOD", "Geometry Dash On Death", "0.1.0")]
public class Plugin : BaseUnityPlugin
{
private const string modGUID = "org.agmas.GDOD";
private const string modName = "Geometry Dash On Death";
private const string modVersion = "0.1.0";
public ConfigEntry<string> url;
private readonly Harmony harmony = new Harmony("org.agmas.GDOD");
public static Plugin Instance;
public ManualLogSource mls;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
url = ((BaseUnityPlugin)this).Config.Bind<string>("URL", "url", "steam://rungameid/322170", "Use steam://rungameid/(GAMEID) to use another game, or anything else to open up a browser tab.");
mls = Logger.CreateLogSource("org.agmas.GDOD");
mls.LogInfo((object)"We're up and running!");
harmony.PatchAll(typeof(PlayerControllerBPatch));
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "GDOD";
public const string PLUGIN_NAME = "GDOD";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace GDOD.patches
{
[HarmonyPatch(typeof(PlayerControllerB))]
internal class PlayerControllerBPatch
{
[HarmonyPatch(typeof(PlayerControllerB), "KillPlayer")]
[HarmonyPostfix]
private static void undo(PlayerControllerB __instance)
{
Plugin.Instance.url = ((BaseUnityPlugin)Plugin.Instance).Config.Bind<string>("URL", "url", "steam://rungameid/322170", "Use steam://rungameid/(GAMEID) to use another game, or anything else to open up a browser tab.");
if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)__instance)
{
Application.OpenURL(Plugin.Instance.url.Value);
}
}
}
}