Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of HexMapDiscovery v1.0.1
Plugins/HexMapDiscovery.dll
Decompiled a month agousing 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; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("HexMapDiscovery")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("HexMapDiscovery")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("e53ae2bc-c77e-4f27-bf71-bd03232cf52c")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace HexMapDiscovery; [BepInPlugin("com.hex.mapdiscovery", "HexMapDiscovery", "1.0.1")] public class Plugin : BaseUnityPlugin { [HarmonyPatch(typeof(Minimap), "Explore", new Type[] { typeof(Vector3), typeof(float) })] internal static class PatchMinimapExplore { private static readonly FieldInfo AttachedField = typeof(Player).GetField("m_attached", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); private static readonly FieldInfo AttachedToShipField = typeof(Player).GetField("m_attachedToShip", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); private static void Prefix(ref float radius) { if (IsModEnabled.Value && !((Object)(object)Player.m_localPlayer == (Object)null) && IsAttachedToShip(Player.m_localPlayer)) { float num = Mathf.Clamp(ExplorationRadiusMultiplier.Value, 1f, 10f); radius *= num; } } private static bool IsAttachedToShip(Player player) { if ((Object)(object)player == (Object)null || AttachedField == null || AttachedToShipField == null) { return false; } bool num = (bool)AttachedField.GetValue(player); bool flag = (bool)AttachedToShipField.GetValue(player); return num && flag; } } private const string PluginGuid = "com.hex.mapdiscovery"; private const string PluginName = "HexMapDiscovery"; private const string PluginVersion = "1.0.1"; private const float DefaultExplorationRadiusMultiplier = 3f; private Harmony _harmonyInstance; private static ConfigEntry<bool> IsModEnabled; private static ConfigEntry<float> ExplorationRadiusMultiplier; internal static ManualLogSource Log; private void Awake() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; IsModEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Enabled", true, "Enable or disable the mod."); ExplorationRadiusMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("Exploration", "ExplorationRadiusMultiplier", 3f, new ConfigDescription("Multiplier for the exploration radius while piloting a ship.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); Assembly executingAssembly = Assembly.GetExecutingAssembly(); _harmonyInstance = new Harmony("com.hex.mapdiscovery"); _harmonyInstance.PatchAll(executingAssembly); Log.LogInfo((object)"HexMapDiscovery v1.0.1 loaded."); } private void OnDestroy() { Log.LogInfo((object)"HexMapDiscovery v1.0.1 unloaded."); Harmony harmonyInstance = _harmonyInstance; if (harmonyInstance != null) { harmonyInstance.UnpatchSelf(); } _harmonyInstance = null; Log = null; } }