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 UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("EnemyPoint")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EnemyPoint")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("1BB229CB-E03B-4010-A922-EFD160632355")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace EnemyPoint;
[BepInPlugin("wzk.lingxi.plugin.enemylocation", "Enemy Location", "1.0")]
public class PatchClass : BaseUnityPlugin
{
private static readonly ManualLogSource logger = Logger.CreateLogSource("Enemy Location");
private void Awake()
{
Harmony.CreateAndPatchAll(typeof(PatchClass), (string)null);
logger.LogInfo((object)"Plugin Enemy Location is loaded!");
}
[HarmonyPostfix]
[HarmonyPatch(typeof(ValuableObject), "Start")]
public static void ValuableObject_POST(ref ValuableObject __instance)
{
__instance.Discover((State)0);
}
[HarmonyPostfix]
[HarmonyPatch(typeof(Enemy), "Spawn")]
public static void EnemySpawn_POST(ref Enemy __instance)
{
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
while (GameDirector.instance.PlayerList.Count == 0)
{
}
MapCustom val = ((Component)__instance).gameObject.AddComponent<MapCustom>();
((Object)val).name = "Enemy_Point_" + ((Object)__instance).name;
val.color = Color.red;
val.sprite = GameDirector.instance.PlayerList[0].playerDeathHead.mapCustom.sprite;
logger.LogInfo((object)"Added One Enemy Point");
}
}