using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using NewMe.Patches;
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("NewMe")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NewMe")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("6221bff9-1e3f-43fc-8d4c-9eedcb95a432")]
[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 NewMe
{
[BepInPlugin("D1g1tal.TPOnEmote", "TPOnEmote", "1.0.1")]
public class BaseThing : BaseUnityPlugin
{
private const string modGUID = "D1g1tal.TPOnEmote";
private const string modName = "TPOnEmote";
private const string modVer = "1.0.1";
public readonly Harmony harmony = new Harmony("D1g1tal.TPOnEmote");
public static ConfigEntry<bool> inverse;
public static ManualLogSource mls;
public static BaseThing Instance;
private void Awake()
{
mls = Logger.CreateLogSource("TPOnEmote");
mls.LogInfo((object)"\r\n_____________________________ ___________ __ \r\n\\__ ___/\\______ \\_____ \\ ____ \\_ _____/ _____ _____/ |_ ____ \r\n | | | ___// | \\ / \\ | __)_ / \\ / _ \\ __\\/ __ \\ \r\n | | | | / | \\ | \\| \\ Y Y ( <_> ) | \\ ___/ \r\n |____| |____| \\_______ /___| /_______ /__|_| /\\____/|__| \\___ >\r\n \\/ \\/ \\/ \\/ \\/ \r\nis now loaded");
harmony.PatchAll(typeof(BaseThing));
harmony.PatchAll(typeof(TPonButton));
}
}
}
namespace NewMe.Patches
{
[HarmonyPatch(typeof(ShipBuildModeManager))]
internal class NoBulidConditions
{
[HarmonyPatch("Update")]
[HarmonyPrefix]
private static void StopPosErrors()
{
OutOfBoundsTrigger[] array = Object.FindObjectsOfType<OutOfBoundsTrigger>();
OutOfBoundsTrigger[] array2 = array;
foreach (OutOfBoundsTrigger val in array2)
{
Object.Destroy((Object)(object)((Component)val).gameObject);
}
ShipBuildModeManager instance = ShipBuildModeManager.Instance;
}
}
[HarmonyPatch(typeof(PlayerControllerB))]
internal class TPonButton
{
[HarmonyPatch("PerformEmote")]
[HarmonyPrefix]
private static void cool()
{
ShipTeleporter[] array = Object.FindObjectsOfType<ShipTeleporter>();
ShipTeleporter[] array2 = array;
foreach (ShipTeleporter val in array2)
{
if ((Object)(object)val != (Object)null && !val.isInverseTeleporter && !val.shipTeleporterAudio.isPlaying)
{
val.PressTeleportButtonServerRpc();
}
}
}
}
[HarmonyPatch(typeof(DoublewingAI))]
internal class bird
{
[HarmonyPatch("AlertBird")]
[HarmonyPostfix]
private static void Somethingbad()
{
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
DoublewingAI[] array = Object.FindObjectsOfType<DoublewingAI>();
DoublewingAI[] array2 = array;
foreach (DoublewingAI val in array2)
{
if ((Object)(object)val != (Object)null)
{
RadMechAI[] array3 = (RadMechAI[])(object)Resources.FindObjectsOfTypeAll(typeof(RadMechAI));
RadMechAI val2 = array3[1];
Object.Instantiate<RadMechAI>(val2, ((Component)val).transform.position, Quaternion.identity);
}
}
}
private static Vector3 spawnPos(Vector3 pos, Vector3 dir)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0004: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
Ray val = default(Ray);
((Ray)(ref val))..ctor(pos, dir);
RaycastHit val2 = default(RaycastHit);
Physics.Raycast(val, ref val2, 100f);
return ((RaycastHit)(ref val2)).point;
}
}
}