using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using PikachuBracken.Patches;
using RaccoonLib.Modules;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("RegigigasBracken")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RegigigasBracken")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ac5b6f02-3f2e-4179-b14e-d4db3b1738b5")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace PikachuBracken
{
[BepInPlugin("Brew.PikachuBracken", "PikachuBracken", "1.0.0")]
public class PikachuBase : BaseUnityPlugin
{
private const string modGUID = "Brew.PikachuBracken";
private const string modName = "PikachuBracken";
private const string modVersion = "1.0.0";
private readonly Harmony harmony = new Harmony("Brew.PikachuBracken");
public static PikachuBase Instance;
internal ManualLogSource mls;
public static GameObject PikaPrefab;
public static BaseUnityPlugin plugin;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
mls = Logger.CreateLogSource("Brew.PikachuBracken");
plugin = (BaseUnityPlugin)(object)Instance;
mls.LogInfo((object)"pikachu bracken mod initialised");
string location = ((BaseUnityPlugin)Instance).Info.Location;
string text = "PikachuBracken.dll";
string text2 = "pikachubracken";
AssetBundle val = ContentLoader.FetchAssetBundle((BaseUnityPlugin)(object)Instance, text, text2);
PikaPrefab = val.LoadAsset<GameObject>("Assets/Brew/PikachuF.prefab");
Debug.Log((object)"pikachu prefab loaded");
harmony.PatchAll(typeof(PikachuBase));
harmony.PatchAll(typeof(FlowermanAIPatch));
}
}
}
namespace PikachuBracken.Patches
{
[HarmonyPatch(typeof(FlowermanAI))]
internal class FlowermanAIPatch
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
private static void startPatch(FlowermanAI __instance)
{
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
Debug.Log((object)"pikachu has awoken");
GameObject val = EnemyReskinner.ReskinBracken(__instance, PikachuBase.PikaPrefab);
if (Object.op_Implicit((Object)(object)val))
{
GameObject gameObject = ((Component)val.transform.Find("Regi")).gameObject;
val.transform.localPosition = new Vector3(0f, 0f, 0f);
gameObject.transform.localPosition = new Vector3(0f, 0f, 0f);
}
}
}
}