using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
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("GutterBirds")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GutterBirds")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("66f00767-d64c-4f56-8098-04c8f655e903")]
[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 GreenThumper;
[BepInPlugin("Muddii.GreenThumper", "GreenThumper", "1.0.0.0")]
public class Plugin : BaseUnityPlugin
{
[HarmonyPatch]
internal class EnemyPatches
{
[HarmonyPatch(typeof(CrawlerAI), "__initializeVariables")]
[HarmonyPostfix]
public static void ChangeThumperMat(CrawlerAI __instance)
{
Transform val = ((Component)__instance).transform.Find("CrawlerModel");
Transform val2 = ((Component)val).transform.Find("Cube.002");
((Renderer)((Component)val2).GetComponentInChildren<SkinnedMeshRenderer>()).material = bundle.LoadAsset<Material>("Assets/WackThumper/Head.mat");
}
}
private const string GUID = "Muddii.GreenThumper";
private const string NAME = "GreenThumper";
private const string VERSION = "1.0.0.0";
private readonly Harmony harmony = new Harmony("Muddii.GreenThumper");
public static AssetBundle Assets;
public static Plugin Instance;
public static string assetDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "thumper");
public static AssetBundle bundle = AssetBundle.LoadFromFile(assetDir);
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
harmony.PatchAll(typeof(EnemyPatches));
}
}