using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using Fusion; using HarmonyLib; using Il2CppInterop.Runtime.Injection; using Il2CppInterop.Runtime.InteropTypes; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem.Collections.Generic; using Microsoft.CodeAnalysis; using SSSGame; using SandSailorStudio.Inventory; using SandSailorStudio.WorldGen; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("AskaScout")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.1")] [assembly: AssemblyInformationalVersion("1.0.1+8edde25dd5244eb2a60169a7a69309ac44f0660f")] [assembly: AssemblyProduct("Aska Scout")] [assembly: AssemblyTitle("AskaScout")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.1.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 AskaScout { public class AreaScanner : MonoBehaviour { private const float FallbackBaseRadiusMeters = 100f; private const float CaveBaseRadiusMeters = 60f; private const float NotificationGraceSeconds = 8f; private const int MaxNotificationsPerTick = 4; private float _nextScan; private float _attachTime; private int _notifiedThisTick; private WorldDataMap _map; private CavesManager _caves; private readonly HashSet _revealedCaves = new HashSet(); private readonly HashSet _processed = new HashSet(); private void Start() { _attachTime = Time.time; } private void Update() { if (ScoutConfig.Enabled.Value && !(Time.time < _nextScan)) { _nextScan = Time.time + Mathf.Max(0.25f, ScoutConfig.ScanIntervalSeconds.Value); Scan(); } } private void Scan() { //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) try { WorldDataMap val = ResolveMap(); if (val == null) { return; } Dictionary areaInstances = val._areaInstances; if (areaInstances == null) { return; } float value = ScoutConfig.GlobalMultiplier.Value; Vector3 position = ((Component)this).transform.position; Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(position.x, position.z); _notifiedThisTick = 0; Enumerator enumerator = areaInstances.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair current = enumerator.Current; int key = current.Key; if (_processed.Contains(key)) { continue; } AreaInstance value2 = current.Value; if (value2 == null) { continue; } if (value2.isExplored) { _processed.Add(key); continue; } IAreaInstanceMarkerHandler areaInstanceMarkerHandler = value2.areaInstanceMarkerHandler; if (areaInstanceMarkerHandler == null) { continue; } float num = 100f; try { float discoveryRadius = areaInstanceMarkerHandler.GetDiscoveryRadius(); if (discoveryRadius > 0f) { num = discoveryRadius; } } catch { } string markerKey = null; try { ItemInfo markerInfo = areaInstanceMarkerHandler.GetMarkerInfo(); if ((Object)(object)markerInfo != (Object)null) { markerKey = ScoutConfig.MarkerKey(((Object)markerInfo).name); } } catch { } float num2 = ScoutConfig.GetMultiplierForMarker(markerKey) * value; if (num2 <= 0f) { continue; } float num3 = num * num2; if (!TryGetWorldXZ(value2, out var xz)) { continue; } float num4 = Vector2.Distance(val2, xz); if (!(num4 > num3)) { string name = null; try { name = value2.name; } catch { } Discover(value2, areaInstanceMarkerHandler, key, name, num4, num3); } } ScanCaves(val2, value); } catch (Exception ex) { ManualLogSource log = Plugin.Log; bool flag = default(bool); BepInExWarningLogInterpolatedStringHandler val3 = new BepInExWarningLogInterpolatedStringHandler(23, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val3).AppendLiteral("AskaScout scan failed: "); ((BepInExLogInterpolatedStringHandler)val3).AppendFormatted(ex.Message); } log.LogWarning(val3); } } private void ScanCaves(Vector2 playerXZ, float globalMult) { //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)_caves == (Object)null) { _caves = Object.FindObjectOfType(); } if ((Object)(object)_caves == (Object)null) { return; } Dictionary explorationHandlers = _caves._explorationHandlers; Dictionary residentCaves = _caves._residentCaves; if (explorationHandlers == null || residentCaves == null) { return; } float num = ScoutConfig.Caves.Value * globalMult; if (num <= 0f) { return; } float num2 = 60f * num; Enumerator enumerator = explorationHandlers.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair current = enumerator.Current; int key = current.Key; if (_revealedCaves.Contains(key)) { continue; } CaveExplorationHandler value = current.Value; if (value == null || value.data == null) { continue; } if (value.data.explored) { _revealedCaves.Add(key); continue; } CaveEntrance val = null; try { residentCaves.TryGetValue(key, ref val); } catch { } if (!((Object)(object)val == (Object)null)) { Vector3 position; try { position = ((Component)val).transform.position; } catch { continue; } float num3 = Vector2.Distance(playerXZ, new Vector2(position.x, position.z)); if (!(num3 > num2)) { RevealCave(key, value, num3, num2); } } } } catch (Exception ex) { ManualLogSource log = Plugin.Log; bool flag = default(bool); BepInExWarningLogInterpolatedStringHandler val2 = new BepInExWarningLogInterpolatedStringHandler(28, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("AskaScout cave scan failed: "); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted(ex.Message); } log.LogWarning(val2); } } private void RevealCave(int id, CaveExplorationHandler handler, float dist, float threshold) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown bool flag = default(bool); try { handler.data.explored = true; handler._OnCaveExplorationChanged(true); handler._RefreshMarkerState(); _revealedCaves.Add(id); MaybeNotifyCave(); ManualLogSource log = Plugin.Log; BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(39, 3, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("AskaScout discovered cave "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(id); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" at "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(dist, "F1"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("m (<= "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(threshold, "F1"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("m)."); } log.LogInfo(val); } catch (Exception ex) { ManualLogSource log2 = Plugin.Log; BepInExWarningLogInterpolatedStringHandler val2 = new BepInExWarningLogInterpolatedStringHandler(31, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("AskaScout reveal cave "); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted(id); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" failed: "); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted(ex.Message); } log2.LogWarning(val2); _revealedCaves.Add(id); } } private void MaybeNotifyCave() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown try { if (ScoutConfig.ShowDiscoveryNotifications.Value && !(Time.time < _attachTime + 8f) && _notifiedThisTick < 4) { string text = "Cave"; string empty = string.Empty; NotificationMenu.DisplayImportant(NotificationMenu.c_CaveDiscoveredNotificationID, ref text, ref empty, (Sprite)null, -1f, (NotificationType)3); _notifiedThisTick++; } } catch (Exception ex) { ManualLogSource log = Plugin.Log; bool flag = default(bool); BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(30, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("AskaScout cave notify failed: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(ex.Message); } log.LogWarning(val); } } private void Discover(AreaInstance ai, IAreaInstanceMarkerHandler handler, int uid, string name, float dist, float threshold) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown bool flag = default(bool); try { ai.isExplored = true; handler.RefreshExploration(); _processed.Add(uid); MaybeNotify(handler, name); ManualLogSource log = Plugin.Log; BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(36, 3, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("AskaScout discovered '"); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(name); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("' at "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(dist, "F1"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("m (<= "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(threshold, "F1"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("m)."); } log.LogInfo(val); } catch (Exception ex) { ManualLogSource log2 = Plugin.Log; BepInExWarningLogInterpolatedStringHandler val2 = new BepInExWarningLogInterpolatedStringHandler(30, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("AskaScout discover '"); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted(name); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("' failed: "); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted(ex.Message); } log2.LogWarning(val2); _processed.Add(uid); } } private void MaybeNotify(IAreaInstanceMarkerHandler handler, string name) { //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown bool flag3 = default(bool); try { if (!ScoutConfig.ShowDiscoveryNotifications.Value || Time.time < _attachTime + 8f || _notifiedThisTick >= 4) { return; } bool flag; try { flag = handler.ShowDiscoverNotification(); } catch { flag = true; } if (!flag) { return; } bool flag2 = true; try { AreaInstanceMarkerHandler val = ((Il2CppObjectBase)handler).TryCast(); if (val != null) { flag2 = val._CheckMarkerDisplayCondition(); } } catch { flag2 = true; } if (!flag2) { ManualLogSource log = Plugin.Log; BepInExInfoLogInterpolatedStringHandler val2 = new BepInExInfoLogInterpolatedStringHandler(59, 1, ref flag3); if (flag3) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("AskaScout suppressed toast for '"); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted(name); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("' (marker not displayable)."); } log.LogInfo(val2); return; } string value = null; Sprite val3 = null; ItemInfo markerInfo = handler.GetMarkerInfo(); if ((Object)(object)markerInfo != (Object)null) { try { value = markerInfo.Name; } catch { } try { val3 = markerInfo.icon; } catch { } } if (string.IsNullOrEmpty(value)) { value = name ?? "Area"; } string empty = string.Empty; NotificationMenu.DisplayImportant(NotificationMenu.c_DiscoveryNotificationID, ref value, ref empty, val3, -1f, (NotificationType)3); _notifiedThisTick++; } catch (Exception ex) { ManualLogSource log2 = Plugin.Log; BepInExWarningLogInterpolatedStringHandler val4 = new BepInExWarningLogInterpolatedStringHandler(25, 1, ref flag3); if (flag3) { ((BepInExLogInterpolatedStringHandler)val4).AppendLiteral("AskaScout notify failed: "); ((BepInExLogInterpolatedStringHandler)val4).AppendFormatted(ex.Message); } log2.LogWarning(val4); } } private WorldDataMap ResolveMap() { if (_map != null) { return _map; } _map = MapAccess.Resolve(out var _); return _map; } private static bool TryGetWorldXZ(AreaInstance ai, out Vector2 xz) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) xz = default(Vector2); try { Vector2Int position = ai.position; xz = new Vector2((float)((Vector2Int)(ref position)).x, (float)((Vector2Int)(ref position)).y); return true; } catch { return false; } } } [HarmonyPatch(typeof(Character))] public static class CharacterSpawnPatch { [HarmonyPostfix] [HarmonyPatch("Spawned")] public static void Spawned(Character __instance) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if (__instance.IsPlayer() && ((NetworkBehaviour)__instance).GetLocalAuthorityMask() == 1 && !((Object)(object)((Component)__instance).GetComponentInChildren() != (Object)null)) { GameObject val = new GameObject("AskaScout_Scanner"); val.transform.SetParent(((Component)__instance).gameObject.transform, false); val.transform.localPosition = Vector3.zero; val.AddComponent(); Plugin.Log.LogInfo((object)"AskaScout scanner attached to local player."); } } } internal static class MapAccess { public static WorldDataMap Resolve(out string source) { WorldDataMap val = FromGenerator(Object.FindObjectOfType()); if (val != null) { source = "WorldGenerator.GetDataMap"; return val; } WorldHorizonController val2 = Object.FindObjectOfType(); if ((Object)(object)val2 != (Object)null) { try { val = val2._worldMap; } catch { val = null; } if (val != null) { source = "WorldHorizonController._worldMap"; return val; } } try { Il2CppArrayBase val3 = Resources.FindObjectsOfTypeAll(); for (int i = 0; i < val3.Length; i++) { val = FromGenerator(val3[i]); if (val != null) { source = "WorldGenerator(all)"; return val; } } } catch { } source = "none"; return null; } private static WorldDataMap FromGenerator(WorldGenerator gen) { if ((Object)(object)gen == (Object)null) { return null; } WorldDataMap val = null; try { val = gen.GetDataMap(); } catch { } if (val == null) { try { val = gen._worldDataMap; } catch { } } return val; } } [BepInPlugin("smithio.aska.scout", "Aska Scout", "1.0.1")] public class Plugin : BasePlugin { public const string PluginGuid = "smithio.aska.scout"; public const string PluginName = "Aska Scout"; public const string PluginVersion = "1.0.1"; internal static ManualLogSource Log; public override void Load() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown Log = ((BasePlugin)this).Log; ManualLogSource log = Log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(10, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendFormatted("Aska Scout"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" v"); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted("1.0.1"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" loading"); } log.LogInfo(val); ScoutConfig.Init(((BasePlugin)this).Config); ClassInjector.RegisterTypeInIl2Cpp(); new Harmony("smithio.aska.scout").PatchAll(typeof(CharacterSpawnPatch)); ManualLogSource log2 = Log; val = new BepInExInfoLogInterpolatedStringHandler(21, 3, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendFormatted("Aska Scout"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" v"); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted("1.0.1"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" loaded (Enabled="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(ScoutConfig.Enabled.Value); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(")."); } log2.LogInfo(val); } } internal static class ScoutConfig { public enum Category { Threats, Resources, Landmarks, Islands } public const string SectionDiscovery = "Discovery"; public const string SectionCategories = "Categories"; public static ConfigEntry Enabled; public static ConfigEntry GlobalMultiplier; public static ConfigEntry ScanIntervalSeconds; public static ConfigEntry ShowDiscoveryNotifications; public static ConfigEntry Threats; public static ConfigEntry Resources; public static ConfigEntry Landmarks; public static ConfigEntry Islands; public static ConfigEntry Caves; public static ConfigEntry UnmappedFallback; private static readonly Dictionary _markerCategory = new Dictionary { { "WolfDen", Category.Threats }, { "DraugarField", Category.Threats }, { "Bear", Category.Threats }, { "CemeterySmall", Category.Threats }, { "CemeteryLarge", Category.Threats }, { "RuinsHeads", Category.Threats }, { "WightShipwreck", Category.Threats }, { "Spire", Category.Threats }, { "MiniSpire", Category.Threats }, { "HostileCamp", Category.Threats }, { "HostileSettlement", Category.Threats }, { "HostileStronghold", Category.Threats }, { "StoneJotunArena", Category.Threats }, { "MarshBoss", Category.Threats }, { "Whaleslug", Category.Threats }, { "FishingGroundCod", Category.Resources }, { "FishingGroundSalmon", Category.Resources }, { "FishingGroundSturgeon", Category.Resources }, { "FishingGroundMackerel", Category.Resources }, { "FishingGroundWolffish", Category.Resources }, { "NidhoggNest", Category.Resources }, { "KycklingNest", Category.Resources }, { "Shipwreck", Category.Landmarks }, { "ExplorationTower", Category.Landmarks }, { "LakeBig", Category.Landmarks }, { "LakeSmall", Category.Landmarks }, { "UnexploredIsland", Category.Islands } }; private static readonly HashSet _loggedUnmapped = new HashSet(); public static void Init(ConfigFile cfg) { Enabled = cfg.Bind("Discovery", "Enabled", true, "Master on/off for the discovery-distance scanner."); GlobalMultiplier = cfg.Bind("Discovery", "GlobalMultiplier", 1f, "Multiplier applied on top of every category multiplier. 1.0 = categories as written; 2.0 = twice as far for everything."); ScanIntervalSeconds = cfg.Bind("Discovery", "ScanIntervalSeconds", 2f, "How often (seconds) the scanner checks AOI distances. Lower = more responsive, slightly more CPU. Floored at 0.25s."); ShowDiscoveryNotifications = cfg.Bind("Discovery", "ShowDiscoveryNotifications", true, "Let the game show its normal 'area discovered' feedback when this mod reveals an AOI."); Threats = cfg.Bind("Categories", "Threats", 2f, "Distance multiplier for hostile sites/lairs and field bosses (wolf dens, cemeteries, draugr, hostile camps/settlements/strongholds, spires, bears, Jotun/Marsh/Whaleslug bosses)."); Resources = cfg.Bind("Categories", "Resources", 2.5f, "Distance multiplier for gatherable sites (fishing grounds, Nidhogg/Kyckling nests)."); Landmarks = cfg.Bind("Categories", "Landmarks", 2f, "Distance multiplier for non-combat points of interest (shipwrecks, exploration towers, lakes)."); Islands = cfg.Bind("Categories", "Islands", 2f, "Distance multiplier for islands (their vanilla radius is already large, 108-720m)."); Caves = cfg.Bind("Categories", "Caves", 2.5f, "Distance multiplier for cave entrances. Caves have no vanilla discovery radius, so this scales a fixed ~60m base (default 2.5 = ~150m)."); UnmappedFallback = cfg.Bind("Categories", "UnmappedFallback", 1f, "Distance multiplier for any AOI marker not in the four categories above. 1.0 = vanilla. Unmapped markers are logged once so they can be categorised."); } public static string MarkerKey(string markerAssetName) { if (string.IsNullOrEmpty(markerAssetName)) { return null; } if (markerAssetName.StartsWith("Item_Misc_BiomeMarker")) { return markerAssetName.Substring("Item_Misc_BiomeMarker".Length); } if (markerAssetName.StartsWith("Item_Misc_Marker")) { return markerAssetName.Substring("Item_Misc_Marker".Length); } return markerAssetName; } public static float GetMultiplierForMarker(string markerKey) { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown if (markerKey != null && _markerCategory.TryGetValue(markerKey, out var value)) { switch (value) { case Category.Threats: return Threats.Value; case Category.Resources: return Resources.Value; case Category.Landmarks: return Landmarks.Value; case Category.Islands: return Islands.Value; } } if (_loggedUnmapped.Add(markerKey ?? "")) { ManualLogSource log = Plugin.Log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(50, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("[scout] unmapped marker '"); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(markerKey ?? ""); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("' -> UnmappedFallback ("); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(UnmappedFallback.Value); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(")."); } log.LogInfo(val); } return UnmappedFallback.Value; } } public static class MyPluginInfo { public const string PLUGIN_GUID = "AskaScout"; public const string PLUGIN_NAME = "Aska Scout"; public const string PLUGIN_VERSION = "1.0.1"; } }