using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
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(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("SoggyParry")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Sog")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SoggyParry")]
[assembly: AssemblyTitle("SoggyParry")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace SoggyParry;
[BepInPlugin("fri.ultrakill.soggyflash", "Soggy Flash", "1.1.0")]
public class Plugin : BaseUnityPlugin
{
private static List<Sprite> _sogsters = new List<Sprite>();
private void Awake()
{
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
string path = Assembly.GetExecutingAssembly().Location.Replace("SoggyParry.dll", "");
string text = Path.Combine(path, "soggyparryassets");
AssetBundle val = AssetBundle.LoadFromFile(text);
_sogsters.Add(val.LoadAsset<Sprite>("soggycat.png"));
_sogsters.Add(val.LoadAsset<Sprite>("soggycat2.jpg"));
_sogsters.Add(val.LoadAsset<Sprite>("soggycat3.jpg"));
_sogsters.Add(val.LoadAsset<Sprite>("soggycat4.jpg"));
_sogsters.Add(val.LoadAsset<Sprite>("soggycat5.png"));
_sogsters.Add(val.LoadAsset<Sprite>("soggycat6.png"));
new Harmony("soggyparry").PatchAll(typeof(Plugin));
}
[HarmonyPatch(typeof(TimeController), "ParryFlash")]
[HarmonyPostfix]
private static void MakeSoggy(TimeController __instance)
{
__instance.parryFlash.GetComponent<Image>().sprite = _sogsters[Random.Range(0, _sogsters.Count)];
}
}