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 Il2CppSystem;
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]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.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]
[Microsoft.CodeAnalysis.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;
[HarmonyPatch(typeof(ScoutAntennaDetection), "UpdateTendrilState")]
[HarmonyPostfix]
public static void OnTendrilsOut(ScoutAntennaDetection __instance)
{
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
Debug.Log(Object.op_Implicit("spam"));
glowstickColorTimer += 1f * Time.deltaTime;
if (glowstickColorTimer >= 1f)
{
startColor = endColor;
endColor = new Color(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f), 1f);
glowstickColorTimer = 0f;
}
for (int i = 0; i < __instance.m_activeTendrils.Count; i++)
{
__instance.m_activeTendrils[i].m_colorDefault = Color.Lerp(startColor, endColor, glowstickColorTimer);
}
}
}
}