using System; 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 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: AssemblyTitle("HTF")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("HTF")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("5208ed49-769e-472d-8164-a43d8313e78b")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace HTF_AimPoint; [BepInPlugin("HTF.kr.AimPoint", "AimPoint", "1.0.1")] public class ModBehaviour : BaseUnityPlugin { [HarmonyPatch(typeof(Weapon))] public class Weapon_path { [HarmonyPrefix] [HarmonyPatch("Shoot")] private static void Shoot_Prefix(Weapon __instance) { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) if (ShootOnlyCenter.Value && !((Object)(object)((Item)__instance).Holder == (Object)null) && !((Object)(object)((Item)__instance).Holder.CamObject == (Object)null) && !((Object)(object)__instance.Attachments == (Object)null) && !((Object)(object)__instance.Attachments.FirePoint == (Object)null)) { __instance.Attachments.FirePoint.rotation = Quaternion.LookRotation(((Item)__instance).Holder.CamObject.forward, __instance.Attachments.FirePoint.up); } } } [HarmonyPatch(typeof(CloseItemsUI))] public class CloseItemsUI_path { private static Image centerDot; [HarmonyPostfix] [HarmonyPatch("InitializeLocal")] private static void InitializeLocal_Postfix(Image ____dotPrefab, Transform ____itemDotsCanvas) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) centerDot = Object.Instantiate(____dotPrefab, ____itemDotsCanvas); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor((float)Screen.width / 2f, (float)Screen.height / 2f); ((Graphic)centerDot).color = Color.white; ((Component)centerDot).transform.position = Vector2.op_Implicit(val); ((Graphic)centerDot).rectTransform.sizeDelta = new Vector2((float)(AimPointSize.Value * 2), (float)(AimPointSize.Value * 2)); } } private Harmony harmony; private static ManualLogSource Log; private static ConfigEntry AimPointSize; private static ConfigEntry ShootOnlyCenter; private void Awake() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown harmony = new Harmony("HTF.kr.AimPoint"); harmony.PatchAll(); AimPointSize = ((BaseUnityPlugin)this).Config.Bind("Client Options", "AimPointSize", 4, new ConfigDescription("Adjust the size of the aim‑point.", (AcceptableValueBase)(object)new AcceptableValueRange(0, 12), Array.Empty())); ShootOnlyCenter = ((BaseUnityPlugin)this).Config.Bind("Client Options", "ShootOnlyCenter", false, new ConfigDescription("Shoot only toward the center.", (AcceptableValueBase)null, Array.Empty())); Log = ((BaseUnityPlugin)this).Logger; Log.LogInfo((object)"AimPoint enble"); } }