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 HarmonyLib;
using Microsoft.CodeAnalysis;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("WK_CrankIt")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyInformationalVersion("0.1.0+2c0112dce3606b326905e5bebba2f8f1a86072fb")]
[assembly: AssemblyProduct("WK_CrankIt")]
[assembly: AssemblyTitle("WK_CrankIt")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.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 WK_CrankIt
{
[HarmonyPatch(typeof(ENT_Player), "Update")]
public class FlashlightCrankPatch
{
[HarmonyPostfix]
public static void Postfix(ENT_Player __instance)
{
Hand[] hands = __instance.hands;
foreach (Hand val in hands)
{
HandItem handItem = val.GetHandItem();
HandItem_Flashlight val2 = (HandItem_Flashlight)(object)((handItem is HandItem_Flashlight) ? handItem : null);
if (val2 != null && InputManager.GetButton(val.fireButton).Pressed)
{
((HandItem)val2).Use();
}
}
}
}
[BepInPlugin("com.validaq.WK_CrankIt", "WK_CrankIt", "0.1.0")]
public class WK_CrankIt : BaseUnityPlugin
{
private const string pluginGuid = "com.validaq.WK_CrankIt";
private const string pluginName = "WK_CrankIt";
public const string pluginVersion = "0.1.0";
internal static ManualLogSource Logger;
private void Awake()
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
Logger = ((BaseUnityPlugin)this).Logger;
new Harmony("com.validaq.WK_CrankIt").PatchAll();
Logger.LogInfo((object)"Plugin com.validaq.WK_CrankIt v0.1.0 is loaded!");
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "WK_CrankIt";
public const string PLUGIN_NAME = "WK_CrankIt";
public const string PLUGIN_VERSION = "0.1.0";
}
}