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.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LethalCompanyInputUtils.Api;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.InputSystem;
using WOAH.patches;
[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("WOAH")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Your Mod Description Goes Here")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("WOAH")]
[assembly: AssemblyTitle("WOAH")]
[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;
}
}
}
public class InputClass : LcInputActions
{
[InputAction("<Keyboard>/3", Name = "woah")]
public InputAction WoahKey { get; set; }
}
namespace WOAH
{
[BepInPlugin("org.agmas.WOAH", "Woah", "0.1.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
private const string modGUID = "org.agmas.WOAH";
private const string modName = "Woah";
public InputClass InputActionsInstance = new InputClass();
private const string modVersion = "0.1.0";
private readonly Harmony harmony = new Harmony("org.agmas.WOAH");
public static Plugin Instance;
public ManualLogSource mls;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
mls = Logger.CreateLogSource("org.agmas.WOAH");
mls.LogInfo((object)"We're up and running!");
harmony.PatchAll(typeof(PlayerControllerBPatch));
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "WOAH";
public const string PLUGIN_NAME = "WOAH";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace WOAH.patches
{
[HarmonyPatch(typeof(PlayerControllerB))]
internal class PlayerControllerBPatch
{
[HarmonyPatch(typeof(PlayerControllerB), "Update")]
[HarmonyPostfix]
private static void undo(PlayerControllerB __instance)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
if (Plugin.Instance.InputActionsInstance.WoahKey.WasPressedThisFrame())
{
__instance.DamagePlayer(0, true, true, (CauseOfDeath)0, 0, false, default(Vector3));
if (StartOfRound.Instance.inShipPhase)
{
HUDManager.Instance.DisplayTip("WOAH", "You can only woah when you're on a planet.\nwoah :(", false, false, "LC_Tip1");
}
}
}
}
}