using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using ComfyLib; using HarmonyLib; using Microsoft.CodeAnalysis; using TMPro; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("Insightful")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Insightful")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("197294cb-ea96-44cf-a334-a10eccf84459")] [assembly: AssemblyFileVersion("1.5.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.5.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Insightful { public static class PluginConfig { public static ConfigEntry IsModEnabled { get; private set; } public static ConfigEntry ReadHiddenTextShortcut { get; private set; } public static void BindConfig(ConfigFile config) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) IsModEnabled = config.BindInOrder("_Global", "isModEnabled", defaultValue: true, "Globally enable or disable this mod."); ReadHiddenTextShortcut = config.BindInOrder("Hotkeys", "readHiddenTextShortcut", new KeyboardShortcut((KeyCode)114, (KeyCode[])(object)new KeyCode[1] { (KeyCode)303 }), "Shortcut to read hidden text inscriptions embedded within objects."); } } public static class InscriptionManager { public const int InscriptionTopicHash = 725742509; public const int InscriptionTextHash = 706967417; public const int InscriptionStyleHash = 334462699; private static GameObject _cachedHovering; private static bool _cachedHasInscription; public static bool HasInscription(GameObject hovering) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)hovering == (Object)(object)_cachedHovering) { return _cachedHasInscription; } _cachedHovering = hovering; _cachedHasInscription = false; if (Object.op_Implicit((Object)(object)hovering) && hovering.TryGetComponentInParent(out ZNetView component) && component.IsValid() && ZDOExtraData.s_strings.TryGetValue(component.m_zdo.m_uid, out var value) && value.ContainsKey(725742509) && value.ContainsKey(706967417)) { _cachedHasInscription = true; } return _cachedHasInscription; } public static void ReadInscription(GameObject hovering) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)hovering) || !hovering.TryGetComponentInParent(out ZNetView component) || !component.IsValid()) { return; } ZDO zdo = component.m_zdo; if (!zdo.TryGetString(725742509, out var result) || !zdo.TryGetString(706967417, out var result2)) { Insightful.LogInfo("RuneStone does not have custom Inscription Topic or Text."); return; } Insightful.LogInfo($"Found hidden Inscription on RuneStone: {zdo.m_uid}"); if (!zdo.TryGetEnum