using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using Enemies;
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(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("RainbowScouts")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RainbowScouts")]
[assembly: AssemblyTitle("RainbowScouts")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace RainbowScouts
{
[BepInPlugin("com.Brandonious.RainbowScouts", "RainbowScouts", "1.0.0")]
public class Loader : BasePlugin
{
public const string MODNAME = "RainbowScouts";
public const string AUTHOR = "Brandonious";
public const string GUID = "com.Brandonious.RainbowScouts";
public const string VERSION = "1.0.0";
public static ManualLogSource Logger;
public override void Load()
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Expected O, but got Unknown
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Expected O, but got Unknown
Logger = ((BasePlugin)this).Log;
Harmony val = new Harmony("RainbowScouts");
val.PatchAll(typeof(RainbowBrain));
ManualLogSource log = ((BasePlugin)this).Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val2 = new BepInExWarningLogInterpolatedStringHandler(15, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("Plugin ");
((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>("RainbowScouts");
((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" Loaded!");
}
log.LogWarning(val2);
}
}
internal class RainbowBrain
{
public static Color startColor;
public static Color endColor;
public static float glowstickColorTimer;
public static float lastUpdateTime;
[HarmonyPatch(typeof(ScoutAntennaDetection), "UpdateTendrilState")]
[HarmonyPostfix]
public static void OnTendrilsOut(ScoutAntennaDetection __instance)
{
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
if (Time.time != lastUpdateTime)
{
glowstickColorTimer += 1f * Time.fixedDeltaTime;
lastUpdateTime = Time.time;
}
if (glowstickColorTimer >= 1f)
{
startColor = endColor;
float num = Random.Range(0f, 1f);
float num2 = Random.Range(0f, 1f);
float num3 = Random.Range(0f, 1f);
endColor = new Color(num, num2, num3, 1f);
endColor *= 1f / Mathf.Max(new float[3] { num, num2, num3 });
endColor.a = 1f;
glowstickColorTimer = 0f;
}
for (int i = 0; i < __instance.m_activeTendrils.Count; i++)
{
__instance.m_activeTendrils[i].m_colorDefault = Color.Lerp(startColor, endColor, glowstickColorTimer);
}
}
}
}