using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using PluginConfig.API;
using PluginConfig.API.Fields;
using UnityEngine;
using UnityEngine.UI;
[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 = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("RegenColorPicker")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RegenColorPicker")]
[assembly: AssemblyTitle("RegenColorPicker")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace RegenColorPicker
{
[BepInPlugin("RegenColorPicker.adry.ultrakill", "RegenColorPicker", "1.0.0")]
public class RegenColorPicker : BaseUnityPlugin
{
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static ColorValueChangeEventDelegate <>9__1_0;
internal void <Awake>b__1_0(ColorValueChangeEvent evt)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
RegenColor = evt.value;
}
}
public static Color RegenColor = Color.green;
private void Awake()
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Expected O, but got Unknown
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Expected O, but got Unknown
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Expected O, but got Unknown
PluginConfigurator val = PluginConfigurator.Create("Regen Color Picker", "RegenColorPicker.adry.ultrakill");
ColorField val2 = new ColorField(val.rootPanel, "Regen Flash Color", "regen_flash_color", Color.green);
object obj = <>c.<>9__1_0;
if (obj == null)
{
ColorValueChangeEventDelegate val3 = delegate(ColorValueChangeEvent evt)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
RegenColor = evt.value;
};
<>c.<>9__1_0 = val3;
obj = (object)val3;
}
val2.onValueChange += (ColorValueChangeEventDelegate)obj;
RegenColor = val2.value;
Harmony val4 = new Harmony("RegenColorPicker.adry.ultrakill");
val4.PatchAll();
}
}
}
namespace RegenColorPicker.Patches
{
[HarmonyPatch(typeof(FlashImage), "Flash")]
public class Patch_FlashImage_Flash
{
private static void Prefix(FlashImage __instance, float amount)
{
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)MonoSingleton<NewMovement>.Instance != (Object)null && (Object)(object)MonoSingleton<NewMovement>.Instance.hpFlash == (Object)(object)__instance)
{
Image component = ((Component)__instance).GetComponent<Image>();
if ((Object)(object)component != (Object)null)
{
((Graphic)component).color = RegenColorPicker.RegenColor;
}
}
}
}
}