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;
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(".NETFramework,Version=v4.7.2", FrameworkDisplayName = "")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("RideTheLightningFix")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Fixes a bug that broke the +RIDE THE LIGHTNING style bonus")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RideTheLightningFix")]
[assembly: AssemblyTitle("RideTheLightningFix")]
[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 RideTheLightningFix
{
[HarmonyPatch]
public static class Patches
{
[HarmonyPrefix]
[HarmonyPatch(typeof(LightningStrikeExplosive), "Start")]
private static void FixReflectedLightningStrike(LightningStrikeExplosive __instance)
{
GameObject reflected = __instance.reflected;
RevolverBeam component = reflected.GetComponent<RevolverBeam>();
component.hitterOverride = "lightningbolt";
}
[HarmonyPostfix]
[HarmonyPatch(typeof(RevolverBeam), "GetHitterName")]
private static void FixGetHitterName(RevolverBeam __instance, ref string __result)
{
if (__instance.hitterOverride == "lightningbolt")
{
__instance.hitterOverride = "";
}
}
}
[BepInPlugin("com.earthlingOnFire.RideTheLightningFix", "+RIDE THE LIGHTNING fix", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
public const string PLUGIN_GUID = "com.earthlingOnFire.RideTheLightningFix";
public const string PLUGIN_NAME = "+RIDE THE LIGHTNING fix";
public const string PLUGIN_VERSION = "1.0.0";
public static ManualLogSource logger;
private void Awake()
{
((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
logger = ((BaseUnityPlugin)this).Logger;
}
private void Start()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.earthlingOnFire.RideTheLightningFix").PatchAll();
logger.LogInfo((object)"Plugin com.earthlingOnFire.RideTheLightningFix is loaded!");
}
public static void Log(string msg)
{
logger.LogInfo((object)msg);
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "RideTheLightningFix";
public const string PLUGIN_NAME = "RideTheLightningFix";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
internal IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}