using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using Coroner;
using GameNetcodeStuff;
using HarmonyLib;
using LethalCompanyHighlights.Configuration;
using LethalCompanyHighlights.Utils;
using LethalConfig;
using LethalConfig.ConfigItems;
using LethalConfig.ConfigItems.Options;
using Microsoft.CodeAnalysis;
using Steamworks;
using Steamworks.Data;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("LethalCompanyHighlights")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Record, clip, and annotate your Lethal Company deaths with Steam. Your incompetence, now professionally documented. ")]
[assembly: AssemblyFileVersion("0.1.7.0")]
[assembly: AssemblyInformationalVersion("0.1.7+7c5f94523aef5c45abb76ec10774a615a42dc131")]
[assembly: AssemblyProduct("LethalCompanyHighlights")]
[assembly: AssemblyTitle("LethalCompanyHighlights")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.7.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 LethalCompanyHighlights
{
internal static class Features
{
internal static bool IsEnabled()
{
return PluginConfig.IsEnabledConfigEntry.Value;
}
internal static bool IsClippingEnabledForOthers()
{
return !PluginConfig.OnlyClipMyDeathsConfigEntry.Value;
}
internal static bool IsProximityEnabled()
{
if (IsClippingEnabledForOthers())
{
return PluginConfig.ProximityCheckConfigEntry.Value;
}
return false;
}
internal static bool IsVisibilityEnabled()
{
if (IsClippingEnabledForOthers())
{
return PluginConfig.VisibilityCheckConfigEntry.Value;
}
return false;
}
}
internal static class SimpleDeathTracker
{
private static readonly ISet<ulong> PlayersKilled = new HashSet<ulong>();
internal static bool PlayerKilled(PlayerControllerB player)
{
return PlayersKilled.Add(player.playerClientId);
}
internal static void Reset()
{
PlayersKilled.Clear();
}
}
internal class RoundPatches
{
private static readonly Regex RemoveLeadingNumber = new Regex("^\\d+\\s+", RegexOptions.Compiled);
private static string _currentPhaseId;
[HarmonyPostfix]
[HarmonyPatch(typeof(MenuManager), "SetLoadingScreen")]
private static void SetLoadingScreenPostfix(bool isLoading)
{
if (Features.IsEnabled() && isLoading)
{
SteamHighlightsPlugin.Logger.LogDebug((object)"MenuManager::SetLoadingScreen, 'LoadingScreen' phase");
SteamTimeline.SetTimelineGameMode((TimelineGameMode)4);
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(StartOfRound), "SetMapScreenInfoToCurrentLevel")]
private static void SetMapScreenInfoToCurrentLevelPostfix()
{
if (Features.IsEnabled())
{
SteamHighlightsPlugin.Logger.LogDebug((object)"StartOfRound::SetMapScreenInfoToCurrentLevel, 'Orbiting' phase");
string text = RemoveLeadingNumber.Replace(StartOfRound.Instance.currentLevel.PlanetName, "");
SteamTimeline.SetTimelineGameMode((TimelineGameMode)2);
SteamTimeline.SetTimelineTooltip("Orbiting " + text, -3f);
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(StartOfRound), "openingDoorsSequence")]
private static void OpeningDoorsSequencePostfix()
{
if (!Features.IsEnabled())
{
return;
}
SteamHighlightsPlugin.Logger.LogDebug((object)"StartOfRound::openingDoorsSequence, 'Exploring' phase");
string text = RemoveLeadingNumber.Replace(StartOfRound.Instance.currentLevel.PlanetName, "");
_currentPhaseId = $"{text}-{Guid.NewGuid()}";
SteamTimeline.SetTimelineGameMode((TimelineGameMode)1);
SteamTimeline.ClearTimelineTooltip(-2f);
SteamTimeline.StartGamePhase();
SteamTimeline.SetGamePhaseId(_currentPhaseId);
SteamTimeline.AddGamePhaseTag(text, "steam_marker", "Planet", 100u);
PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
foreach (PlayerControllerB val in allPlayerScripts)
{
if (((Behaviour)val).isActiveAndEnabled)
{
SteamTimeline.AddGamePhaseTag(val.playerUsername, "steam_group", "Players", 75u);
}
}
VisibilityTracker visibilityTracker = default(VisibilityTracker);
if (!((Component)StartOfRound.Instance.localPlayerController).gameObject.TryGetComponent<VisibilityTracker>(ref visibilityTracker))
{
visibilityTracker = ((Component)StartOfRound.Instance.localPlayerController).gameObject.AddComponent<VisibilityTracker>();
}
visibilityTracker.Initialize();
}
[HarmonyPostfix]
[HarmonyPatch(typeof(MenuManager), "Start")]
private static void StartPostfix()
{
if (Features.IsEnabled())
{
SteamTimeline.EndGamePhase();
SteamTimeline.SetTimelineGameMode((TimelineGameMode)3);
SimpleDeathTracker.Reset();
_currentPhaseId = null;
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(StartOfRound), "ShipLeave")]
private static void ShipLeavePostfix()
{
if (Features.IsEnabled())
{
if (Object.op_Implicit((Object)(object)VisibilityTracker.Instance))
{
VisibilityTracker.Instance.StopVisibilityCoroutine();
}
SteamTimeline.EndGamePhase();
_currentPhaseId = null;
}
}
}
internal class PlayerPatches
{
[CompilerGenerated]
private sealed class <SaveDeathClip>d__4 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public PlayerControllerB player;
private TimelineEventHandle <handle>5__2;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <SaveDeathClip>d__4(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0295: Unknown result type (might be due to invalid IL or missing references)
//IL_029a: Unknown result type (might be due to invalid IL or missing references)
//IL_025a: Unknown result type (might be due to invalid IL or missing references)
//IL_025f: Unknown result type (might be due to invalid IL or missing references)
//IL_02de: Unknown result type (might be due to invalid IL or missing references)
//IL_02e8: Expected O, but got Unknown
bool flag;
AdvancedCauseOfDeath? causeOfDeath;
string text;
uint num;
string text2;
switch (<>1__state)
{
default:
return false;
case 0:
{
<>1__state = -1;
if (!Features.IsEnabled())
{
return false;
}
if (!SimpleDeathTracker.PlayerKilled(player))
{
SteamHighlightsPlugin.Logger.LogDebug((object)("Player '" + player.playerUsername + "' has already been recorded as dead."));
return false;
}
SteamHighlightsPlugin.Logger.LogDebug((object)("Player '" + player.playerUsername + "' died"));
if (!GameNetworkManager.Instance.disableSteam)
{
SteamTimeline.AddGamePhaseTag(player.playerUsername, "steam_death", "Died", 50u);
}
PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController;
flag = false;
if ((Object)(object)localPlayerController == (Object)(object)player)
{
SteamHighlightsPlugin.Logger.LogDebug((object)"It was us who died!");
flag = true;
}
else if (localPlayerController.isPlayerDead)
{
if (!Features.IsClippingEnabledForOthers() || !((Object)(object)localPlayerController.spectatedPlayerScript == (Object)(object)player))
{
goto IL_01a3;
}
SteamHighlightsPlugin.Logger.LogDebug((object)("Observed " + player.playerUsername + " die in spectator mode"));
flag = true;
}
else if (Features.IsProximityEnabled() && IsPlayerNearby(player, 10f))
{
SteamHighlightsPlugin.Logger.LogDebug((object)(player.playerUsername + " died near us"));
flag = true;
}
else
{
if (!Features.IsVisibilityEnabled() || !VisibilityTracker.Instance.HasSeenRecently(player))
{
goto IL_01a3;
}
SteamHighlightsPlugin.Logger.LogDebug((object)(player.playerUsername + " was seen within the last 20 seconds"));
flag = true;
}
goto IL_01b2;
}
case 1:
{
<>1__state = -1;
SteamTimeline.OpenOverlayToTimelineEvent(<handle>5__2);
return false;
}
IL_01a3:
SteamHighlightsPlugin.Logger.LogDebug((object)"All conditions for marking the death as a clip failed, skipping clipping.");
goto IL_01b2;
IL_01b2:
if (!flag)
{
return false;
}
SteamHighlightsPlugin.Logger.LogDebug((object)("Recording death clip for player: '" + player.playerUsername + "'"));
causeOfDeath = API.GetCauseOfDeath(player);
text = (causeOfDeath.HasValue ? API.StringifyCauseOfDeath(causeOfDeath.Value, (Random)null) : "Unknown cause of death.");
num = (((Object)(object)StartOfRound.Instance.localPlayerController == (Object)(object)player) ? 100u : 90u);
text2 = player.playerUsername + " died";
if (PluginConfig.RecordingKindConfigEntry.Value == RecordingKind.Marker)
{
<handle>5__2 = SteamTimeline.AddInstantaneousTimelineEvent(text2, text, "steam_death", num, 0f, (TimelineEventClipPriority)3);
}
else
{
<handle>5__2 = SteamTimeline.AddRangeTimelineEvent(text2, text, "steam_death", num, (float)(-PluginConfig.PreDeathDurationConfigEntry.Value), (float)(PluginConfig.PreDeathDurationConfigEntry.Value + PluginConfig.PostDeathDurationConfigEntry.Value), (TimelineEventClipPriority)3);
}
if (!PluginConfig.OpenOverlayConfigEntry.Value)
{
return false;
}
if (PluginConfig.OnlyMyDeathsConfigEntry.Value && (Object)(object)player != (Object)(object)StartOfRound.Instance.localPlayerController)
{
return false;
}
<>2__current = (object)new WaitForSecondsRealtime((float)PluginConfig.OverlayDelayConfigEntry.Value);
<>1__state = 1;
return true;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(StartOfRound), "ReviveDeadPlayers")]
private static void ReviveDeadPlayersPostfix()
{
if (Features.IsEnabled())
{
SteamHighlightsPlugin.Logger.LogDebug((object)"ReviveDeadPlayers called, clearing killed players list.");
SimpleDeathTracker.Reset();
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(PlayerControllerB), "KillPlayer")]
private static void KillPlayerPostfix(PlayerControllerB __instance)
{
((MonoBehaviour)SteamHighlightsPlugin.Instance).StartCoroutine(SaveDeathClip(__instance));
}
[HarmonyPostfix]
[HarmonyPatch(typeof(PlayerControllerB), "KillPlayerClientRpc")]
private static void KillPlayerClientRpcPostfix(int playerId)
{
PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerId];
if (Object.op_Implicit((Object)(object)val) && ((Behaviour)val).isActiveAndEnabled)
{
((MonoBehaviour)SteamHighlightsPlugin.Instance).StartCoroutine(SaveDeathClip(val));
}
}
private static bool IsPlayerNearby(PlayerControllerB targetPlayer, float radius)
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: 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)
Vector3 val = ((Component)StartOfRound.Instance.localPlayerController).transform.position - ((Component)targetPlayer).transform.position;
return ((Vector3)(ref val)).sqrMagnitude <= radius * radius;
}
[IteratorStateMachine(typeof(<SaveDeathClip>d__4))]
private static IEnumerator SaveDeathClip(PlayerControllerB player)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <SaveDeathClip>d__4(0)
{
player = player
};
}
}
[BepInPlugin("com.smrkn.lethal-company-highlights", "LethalCompanyHighlights", "0.1.7")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class SteamHighlightsPlugin : BaseUnityPlugin
{
internal static ManualLogSource Logger;
private Harmony _harmony;
internal static SteamHighlightsPlugin Instance { get; private set; }
private void Awake()
{
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Expected O, but got Unknown
Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
((Component)this).gameObject.transform.parent = null;
((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
Instance = this;
Logger = ((BaseUnityPlugin)this).Logger;
Logger.LogInfo((object)"Plugin LethalCompanyHighlights is loaded!");
LobbyCompatibility.Check();
PluginConfig.Init(((BaseUnityPlugin)this).Config);
PluginConfigUI.Init();
if (Object.op_Implicit((Object)(object)GameNetworkManager.Instance) && GameNetworkManager.Instance.disableSteam)
{
Logger.LogWarning((object)"Steam integration is disabled, if you're playing in LAN mode I'm afraid this mod won't work.");
return;
}
_harmony = new Harmony("com.smrkn.lethal-company-highlights");
_harmony.PatchAll(typeof(RoundPatches));
_harmony.PatchAll(typeof(PlayerPatches));
}
private void OnDestroy()
{
if (Object.op_Implicit((Object)(object)GameNetworkManager.Instance) && !GameNetworkManager.Instance.disableSteam && Features.IsEnabled())
{
SteamTimeline.EndGamePhase();
}
Harmony harmony = _harmony;
if (harmony != null)
{
harmony.UnpatchSelf();
}
VisibilityTracker[] array = Object.FindObjectsOfType<VisibilityTracker>();
for (int i = 0; i < array.Length; i++)
{
Object.Destroy((Object)(object)array[i]);
}
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "com.smrkn.lethal-company-highlights";
public const string PLUGIN_NAME = "LethalCompanyHighlights";
public const string PLUGIN_VERSION = "0.1.7";
}
}
namespace LethalCompanyHighlights.Utils
{
internal static class LobbyCompatibility
{
internal static void Check()
{
if (Chainloader.PluginInfos.TryGetValue("BMX.LobbyCompatibility", out var value))
{
SteamHighlightsPlugin.Logger.LogInfo((object)"LobbyCompatibility detected, attempting to register compatibility info.");
try
{
Assembly assembly = ((object)value.Instance).GetType().Assembly;
Type type = assembly.GetType("LobbyCompatibility.Enums.CompatibilityLevel");
Type type2 = assembly.GetType("LobbyCompatibility.Enums.VersionStrictness");
Type type3 = assembly.GetType("LobbyCompatibility.Features.PluginHelper");
MethodInfo methodInfo = type3?.GetMethod("RegisterPlugin", new Type[4]
{
typeof(string),
typeof(Version),
type,
type2
});
if (type3 != null && methodInfo != null)
{
object obj = Enum.Parse(type, "ClientOnly");
object obj2 = Enum.Parse(type2, "None");
methodInfo.Invoke(null, new object[4]
{
"com.smrkn.lethal-company-highlights",
Version.Parse("0.1.7"),
obj,
obj2
});
SteamHighlightsPlugin.Logger.LogInfo((object)"Registered with LobbyCompatibility");
}
else
{
SteamHighlightsPlugin.Logger.LogWarning((object)"LobbyCompatibility.RegisterPlugin method not found.");
}
return;
}
catch (Exception arg)
{
SteamHighlightsPlugin.Logger.LogError((object)$"Failed to register with LobbyCompatibility: {arg}");
return;
}
}
SteamHighlightsPlugin.Logger.LogInfo((object)"LobbyCompatibility not detected, skipping compatibility registration");
}
}
public class VisibilityTracker : MonoBehaviour
{
[CompilerGenerated]
private sealed class <>c__DisplayClass14_0
{
public PlayerControllerB localPlayer;
public Func<PlayerControllerB, bool> <>9__0;
internal bool <UpdateVisibility>b__0(PlayerControllerB player)
{
if (IsHumanPlayerAlive(player) && (Object)(object)player != (Object)(object)localPlayer)
{
return IsPlayerVisible(localPlayer, player, 20f);
}
return false;
}
}
[CompilerGenerated]
private sealed class <UpdateVisibility>d__14 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public VisibilityTracker <>4__this;
private <>c__DisplayClass14_0 <>8__1;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <UpdateVisibility>d__14(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>8__1 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0166: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: Expected O, but got Unknown
int num = <>1__state;
VisibilityTracker visibilityTracker = <>4__this;
switch (num)
{
default:
return false;
case 0:
<>1__state = -1;
<>8__1 = new <>c__DisplayClass14_0();
<>8__1.localPlayer = ((Component)visibilityTracker).GetComponentInParent<PlayerControllerB>();
break;
case 1:
<>1__state = -1;
break;
}
if (Features.IsVisibilityEnabled() && visibilityTracker._isRunning && IsHumanPlayerAlive(<>8__1.localPlayer))
{
float unscaledTime = Time.unscaledTime;
foreach (var (item, num4) in visibilityTracker._lastSeen)
{
if (unscaledTime - num4 > 20f)
{
visibilityTracker._stalePlayerIds.Add(item);
}
}
foreach (ulong stalePlayerId in visibilityTracker._stalePlayerIds)
{
visibilityTracker._lastSeen.Remove(stalePlayerId);
}
visibilityTracker._stalePlayerIds.Clear();
foreach (PlayerControllerB item2 in StartOfRound.Instance.allPlayerScripts.Where((PlayerControllerB player) => IsHumanPlayerAlive(player) && (Object)(object)player != (Object)(object)<>8__1.localPlayer && IsPlayerVisible(<>8__1.localPlayer, player, 20f)))
{
visibilityTracker._lastSeen[item2.playerClientId] = unscaledTime;
}
<>2__current = (object)new WaitForSecondsRealtime(0.5f);
<>1__state = 1;
return true;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
private const float DefaultFieldOfView = 66f;
private const float DistanceToCheck = 20f;
internal const float SecondsToCheck = 20f;
private readonly IDictionary<ulong, float> _lastSeen = new Dictionary<ulong, float>();
private readonly IList<ulong> _stalePlayerIds = new List<ulong>();
private Coroutine _visibilityCoroutine;
private bool _isRunning = true;
internal static VisibilityTracker Instance { get; private set; }
public void Awake()
{
if (Object.op_Implicit((Object)(object)Instance))
{
SteamHighlightsPlugin.Logger.LogWarning((object)"A new instance of VisibilityTracker has been created, destroying the old one.");
Object.Destroy((Object)(object)Instance);
}
Instance = this;
}
public void Initialize()
{
_isRunning = true;
_visibilityCoroutine = ((MonoBehaviour)this).StartCoroutine(UpdateVisibility());
}
private static bool IsPlayerVisible(PlayerControllerB from, PlayerControllerB to, float maxDistance)
{
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: 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)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
Vector3 val = (Object.op_Implicit((Object)(object)from.gameplayCamera) ? ((Component)from.gameplayCamera).transform.position : (((Component)from).transform.position + Vector3.up * 0.6f));
Vector3 val2 = (Object.op_Implicit((Object)(object)from.gameplayCamera) ? ((Component)from.gameplayCamera).transform.forward : ((Component)from).transform.forward);
Vector3 val3 = ((Component)to).transform.position + Vector3.up * 0.6f;
Vector3 val4 = val3 - val;
if (((Vector3)(ref val4)).sqrMagnitude > maxDistance * maxDistance)
{
return false;
}
Vector3 normalized = ((Vector3)(ref val4)).normalized;
float num = Vector3.Dot(val2, normalized);
float num2 = Mathf.Cos(Mathf.Clamp(Object.op_Implicit((Object)(object)from.gameplayCamera) ? from.gameplayCamera.fieldOfView : 66f, 66f, 150f) * 0.5f * (MathF.PI / 180f));
if (num < num2)
{
return false;
}
RaycastHit val5 = default(RaycastHit);
if (Physics.Linecast(val, val3, ref val5, StartOfRound.Instance.collidersAndRoomMask))
{
SteamHighlightsPlugin.Logger.LogDebug((object)("Player '" + to.playerUsername + "' is occluded by something"));
return false;
}
SteamHighlightsPlugin.Logger.LogDebug((object)("Player '" + to.playerUsername + "' is visible"));
return true;
}
[IteratorStateMachine(typeof(<UpdateVisibility>d__14))]
private IEnumerator UpdateVisibility()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <UpdateVisibility>d__14(0)
{
<>4__this = this
};
}
private static bool IsHumanPlayerAlive(PlayerControllerB player)
{
if (Object.op_Implicit((Object)(object)player) && player.isPlayerControlled)
{
return !player.isPlayerDead;
}
return false;
}
public void StopVisibilityCoroutine()
{
_isRunning = false;
_lastSeen.Clear();
_stalePlayerIds.Clear();
if (_visibilityCoroutine != null)
{
((MonoBehaviour)this).StopCoroutine(_visibilityCoroutine);
}
}
public bool HasSeenRecently(PlayerControllerB other, float window = 20f)
{
if (_lastSeen.TryGetValue(other.playerClientId, out var value))
{
return Time.unscaledTime - value <= window;
}
return false;
}
public void OnDestroy()
{
StopVisibilityCoroutine();
}
}
}
namespace LethalCompanyHighlights.Configuration
{
internal enum RecordingKind
{
Marker,
Clip
}
internal static class PluginConfig
{
internal static ConfigEntry<bool> IsEnabledConfigEntry;
internal static ConfigEntry<bool> OpenOverlayConfigEntry;
internal static ConfigEntry<bool> OnlyMyDeathsConfigEntry;
internal static ConfigEntry<int> OverlayDelayConfigEntry;
internal static ConfigEntry<int> PreDeathDurationConfigEntry;
internal static ConfigEntry<int> PostDeathDurationConfigEntry;
internal static ConfigEntry<RecordingKind> RecordingKindConfigEntry;
internal static ConfigEntry<bool> OnlyClipMyDeathsConfigEntry;
internal static ConfigEntry<bool> ProximityCheckConfigEntry;
internal static ConfigEntry<bool> VisibilityCheckConfigEntry;
internal static void Init(ConfigFile config)
{
IsEnabledConfigEntry = config.Bind<bool>("General", "Enable", true, "Enable Steam to capture highlights.");
OpenOverlayConfigEntry = config.Bind<bool>("General", "Open Overlay on Death", true, "Would you like to open the Steam Overlay upon death?");
OnlyMyDeathsConfigEntry = config.Bind<bool>("General", "My Deaths Only", true, "Would you like to open the overlay for all deaths, or just yours?");
OverlayDelayConfigEntry = config.Bind<int>("General", "Overlay Delay", 5, "Delay in seconds before the Steam Overlay will open if enabled.\nMust be between 2 and 60 seconds.");
PreDeathDurationConfigEntry = config.Bind<int>("Recording", "Context Duration", 10, "Duration to record prior to death.\nMust be between 5 and 60 seconds.");
PostDeathDurationConfigEntry = config.Bind<int>("Recording", "Post-Death Duration", 10, "Duration to record after death.\nMust be between 5 and 60 seconds.");
RecordingKindConfigEntry = config.Bind<RecordingKind>("General", "Recording Style", RecordingKind.Clip, "Choose the kind of recording to use.\nMarker: Records a marker for the death event, has pretty icons you can click to jump to.\nDuration not supported. \nClip: Marks a clip of the death event with duration support, easier for one-click sharing. No pretty icons :(");
OnlyClipMyDeathsConfigEntry = config.Bind<bool>("Death Capture", "Only Clip My Deaths", false, "Would you like to capture the deaths of other players, or just your own?");
ProximityCheckConfigEntry = config.Bind<bool>("Death Capture", "Proximity Check", true, "Would you like to capture a clip when somebody dies near you?");
VisibilityCheckConfigEntry = config.Bind<bool>("Death Capture", "Visibility Check", true, "Would you like to capture a clip when somebody you've seen within the last 10 seconds dies?");
}
}
internal static class PluginConfigUI
{
[CompilerGenerated]
private static class <>O
{
public static CanModifyDelegate <0>__CanModifySettings;
public static CanModifyDelegate <1>__CanModifyOverlaySettings;
public static CanModifyDelegate <2>__CanModifyDeathCheckSettings;
public static CanModifyDelegate <3>__CanModifyDurationSettings;
}
internal static void Init()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: 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_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Expected O, but got Unknown
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Expected O, but got Unknown
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: 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)
//IL_004e: Expected O, but got Unknown
//IL_00b1: Expected O, but got Unknown
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Expected O, but got Unknown
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Expected O, but got Unknown
//IL_010a: Expected O, but got Unknown
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_010b: Expected O, but got Unknown
//IL_0110: Unknown result type (might be due to invalid IL or missing references)
//IL_0115: Unknown result type (might be due to invalid IL or missing references)
//IL_0120: Unknown result type (might be due to invalid IL or missing references)
//IL_012b: Unknown result type (might be due to invalid IL or missing references)
//IL_0136: Unknown result type (might be due to invalid IL or missing references)
//IL_013d: Expected O, but got Unknown
//IL_013d: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: Expected O, but got Unknown
//IL_0145: Unknown result type (might be due to invalid IL or missing references)
//IL_014c: Unknown result type (might be due to invalid IL or missing references)
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0100: Expected O, but got Unknown
//IL_0172: Expected O, but got Unknown
//IL_016d: Unknown result type (might be due to invalid IL or missing references)
//IL_0173: Expected O, but got Unknown
//IL_0178: Unknown result type (might be due to invalid IL or missing references)
//IL_017d: Unknown result type (might be due to invalid IL or missing references)
//IL_0188: Unknown result type (might be due to invalid IL or missing references)
//IL_0193: Unknown result type (might be due to invalid IL or missing references)
//IL_019e: Unknown result type (might be due to invalid IL or missing references)
//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Unknown result type (might be due to invalid IL or missing references)
//IL_0168: Expected O, but got Unknown
//IL_01cb: Expected O, but got Unknown
//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
//IL_01cd: Expected O, but got Unknown
//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
//IL_01c1: Expected O, but got Unknown
//IL_0225: Expected O, but got Unknown
//IL_0220: Unknown result type (might be due to invalid IL or missing references)
//IL_0227: Expected O, but got Unknown
//IL_022c: Unknown result type (might be due to invalid IL or missing references)
//IL_0231: Unknown result type (might be due to invalid IL or missing references)
//IL_023c: Unknown result type (might be due to invalid IL or missing references)
//IL_0256: Unknown result type (might be due to invalid IL or missing references)
//IL_0261: Unknown result type (might be due to invalid IL or missing references)
//IL_0268: Unknown result type (might be due to invalid IL or missing references)
//IL_0210: Unknown result type (might be due to invalid IL or missing references)
//IL_0215: Unknown result type (might be due to invalid IL or missing references)
//IL_021b: Expected O, but got Unknown
//IL_028e: Expected O, but got Unknown
//IL_0289: Unknown result type (might be due to invalid IL or missing references)
//IL_0290: Expected O, but got Unknown
//IL_0295: Unknown result type (might be due to invalid IL or missing references)
//IL_029a: Unknown result type (might be due to invalid IL or missing references)
//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
//IL_0279: Unknown result type (might be due to invalid IL or missing references)
//IL_027e: Unknown result type (might be due to invalid IL or missing references)
//IL_0284: Expected O, but got Unknown
//IL_02e8: Expected O, but got Unknown
//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
//IL_030a: Unknown result type (might be due to invalid IL or missing references)
//IL_0315: Unknown result type (might be due to invalid IL or missing references)
//IL_031c: Expected O, but got Unknown
//IL_031c: Unknown result type (might be due to invalid IL or missing references)
//IL_0324: Expected O, but got Unknown
//IL_0324: Unknown result type (might be due to invalid IL or missing references)
//IL_032b: Unknown result type (might be due to invalid IL or missing references)
//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
//IL_02de: Expected O, but got Unknown
//IL_0351: Expected O, but got Unknown
//IL_034c: Unknown result type (might be due to invalid IL or missing references)
//IL_0353: Expected O, but got Unknown
//IL_0358: Unknown result type (might be due to invalid IL or missing references)
//IL_035d: Unknown result type (might be due to invalid IL or missing references)
//IL_0368: Unknown result type (might be due to invalid IL or missing references)
//IL_0373: Unknown result type (might be due to invalid IL or missing references)
//IL_037e: Unknown result type (might be due to invalid IL or missing references)
//IL_0385: Expected O, but got Unknown
//IL_0385: Unknown result type (might be due to invalid IL or missing references)
//IL_038d: Expected O, but got Unknown
//IL_038d: Unknown result type (might be due to invalid IL or missing references)
//IL_0394: Unknown result type (might be due to invalid IL or missing references)
//IL_033c: Unknown result type (might be due to invalid IL or missing references)
//IL_0341: Unknown result type (might be due to invalid IL or missing references)
//IL_0347: Expected O, but got Unknown
//IL_03ba: Expected O, but got Unknown
//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
//IL_03ff: Expected O, but got Unknown
//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
//IL_03b0: Expected O, but got Unknown
ConfigEntry<bool> isEnabledConfigEntry = PluginConfig.IsEnabledConfigEntry;
BoolCheckBoxOptions val = new BoolCheckBoxOptions
{
Name = "Enable Death Capture",
Description = "Enable Steam to capture highlights, you must have Steam running and have Game Recording enabled in the Steam settings.",
Section = "General",
RequiresRestart = false
};
object obj = <>O.<0>__CanModifySettings;
if (obj == null)
{
CanModifyDelegate val2 = CanModifySettings;
<>O.<0>__CanModifySettings = val2;
obj = (object)val2;
}
((BaseOptions)val).CanModifyCallback = (CanModifyDelegate)obj;
BoolCheckBoxConfigItem val3 = new BoolCheckBoxConfigItem(isEnabledConfigEntry, val);
ConfigEntry<bool> openOverlayConfigEntry = PluginConfig.OpenOverlayConfigEntry;
BoolCheckBoxOptions val4 = new BoolCheckBoxOptions
{
Name = "Open Overlay on Death",
Description = "Would you like to open the Steam Overlay upon death?",
Section = "Overlay Settings",
RequiresRestart = false
};
object obj2 = <>O.<0>__CanModifySettings;
if (obj2 == null)
{
CanModifyDelegate val5 = CanModifySettings;
<>O.<0>__CanModifySettings = val5;
obj2 = (object)val5;
}
((BaseOptions)val4).CanModifyCallback = (CanModifyDelegate)obj2;
BoolCheckBoxConfigItem val6 = new BoolCheckBoxConfigItem(openOverlayConfigEntry, val4);
ConfigEntry<bool> onlyMyDeathsConfigEntry = PluginConfig.OnlyMyDeathsConfigEntry;
BoolCheckBoxOptions val7 = new BoolCheckBoxOptions
{
Name = "My Deaths Only",
Description = "Would you like to open the overlay for all deaths, or just yours?",
Section = "Overlay Settings",
RequiresRestart = false
};
object obj3 = <>O.<1>__CanModifyOverlaySettings;
if (obj3 == null)
{
CanModifyDelegate val8 = CanModifyOverlaySettings;
<>O.<1>__CanModifyOverlaySettings = val8;
obj3 = (object)val8;
}
((BaseOptions)val7).CanModifyCallback = (CanModifyDelegate)obj3;
BoolCheckBoxConfigItem val9 = new BoolCheckBoxConfigItem(onlyMyDeathsConfigEntry, val7);
ConfigEntry<int> overlayDelayConfigEntry = PluginConfig.OverlayDelayConfigEntry;
IntSliderOptions val10 = new IntSliderOptions
{
Name = "Overlay Delay",
Description = "Delay in seconds before the Steam Overlay will open if enabled.\nMust be between 2 and 60 seconds.",
Section = "Overlay Settings"
};
((BaseRangeOptions<int>)val10).Min = 2;
((BaseRangeOptions<int>)val10).Max = 60;
((BaseOptions)val10).RequiresRestart = false;
object obj4 = <>O.<1>__CanModifyOverlaySettings;
if (obj4 == null)
{
CanModifyDelegate val11 = CanModifyOverlaySettings;
<>O.<1>__CanModifyOverlaySettings = val11;
obj4 = (object)val11;
}
((BaseOptions)val10).CanModifyCallback = (CanModifyDelegate)obj4;
IntSliderConfigItem val12 = new IntSliderConfigItem(overlayDelayConfigEntry, val10);
ConfigEntry<bool> onlyClipMyDeathsConfigEntry = PluginConfig.OnlyClipMyDeathsConfigEntry;
BoolCheckBoxOptions val13 = new BoolCheckBoxOptions
{
Name = "Only Clip My Deaths",
Description = "Would you like to capture the deaths of other players, or just your own?",
Section = "Death Capture",
RequiresRestart = false
};
object obj5 = <>O.<0>__CanModifySettings;
if (obj5 == null)
{
CanModifyDelegate val14 = CanModifySettings;
<>O.<0>__CanModifySettings = val14;
obj5 = (object)val14;
}
((BaseOptions)val13).CanModifyCallback = (CanModifyDelegate)obj5;
BoolCheckBoxConfigItem val15 = new BoolCheckBoxConfigItem(onlyClipMyDeathsConfigEntry, val13);
ConfigEntry<bool> proximityCheckConfigEntry = PluginConfig.ProximityCheckConfigEntry;
BoolCheckBoxOptions val16 = new BoolCheckBoxOptions
{
Name = "Proximity Check",
Description = "Would you like to capture a clip when somebody dies near you?",
Section = "Death Capture",
RequiresRestart = false
};
object obj6 = <>O.<2>__CanModifyDeathCheckSettings;
if (obj6 == null)
{
CanModifyDelegate val17 = CanModifyDeathCheckSettings;
<>O.<2>__CanModifyDeathCheckSettings = val17;
obj6 = (object)val17;
}
((BaseOptions)val16).CanModifyCallback = (CanModifyDelegate)obj6;
BoolCheckBoxConfigItem val18 = new BoolCheckBoxConfigItem(proximityCheckConfigEntry, val16);
ConfigEntry<bool> visibilityCheckConfigEntry = PluginConfig.VisibilityCheckConfigEntry;
BoolCheckBoxOptions val19 = new BoolCheckBoxOptions
{
Name = "Visibility Check",
Description = $"Would you like to capture a clip when somebody you've seen within the last {20f} seconds dies?",
Section = "Death Capture",
RequiresRestart = false
};
object obj7 = <>O.<2>__CanModifyDeathCheckSettings;
if (obj7 == null)
{
CanModifyDelegate val20 = CanModifyDeathCheckSettings;
<>O.<2>__CanModifyDeathCheckSettings = val20;
obj7 = (object)val20;
}
((BaseOptions)val19).CanModifyCallback = (CanModifyDelegate)obj7;
BoolCheckBoxConfigItem val21 = new BoolCheckBoxConfigItem(visibilityCheckConfigEntry, val19);
ConfigEntry<RecordingKind> recordingKindConfigEntry = PluginConfig.RecordingKindConfigEntry;
EnumDropDownOptions val22 = new EnumDropDownOptions
{
Name = "Recording Style",
Description = "Choose the kind of recording to use.\n\nMarker: Records a marker for the death event, has pretty icons you can click to jump to.\nDuration not supported. \n\nClip: Marks a clip of the death event with duration support, easier for one-click sharing.\nNo pretty icons :(",
Section = "General",
RequiresRestart = false
};
object obj8 = <>O.<0>__CanModifySettings;
if (obj8 == null)
{
CanModifyDelegate val23 = CanModifySettings;
<>O.<0>__CanModifySettings = val23;
obj8 = (object)val23;
}
((BaseOptions)val22).CanModifyCallback = (CanModifyDelegate)obj8;
EnumDropDownConfigItem<RecordingKind> val24 = new EnumDropDownConfigItem<RecordingKind>(recordingKindConfigEntry, val22);
ConfigEntry<int> preDeathDurationConfigEntry = PluginConfig.PreDeathDurationConfigEntry;
IntSliderOptions val25 = new IntSliderOptions
{
Name = "Context Duration",
Description = "Duration to record prior to death.\nMust be between 5 and 60 seconds.",
Section = "Recording"
};
((BaseRangeOptions<int>)val25).Min = 5;
((BaseRangeOptions<int>)val25).Max = 60;
((BaseOptions)val25).RequiresRestart = false;
object obj9 = <>O.<3>__CanModifyDurationSettings;
if (obj9 == null)
{
CanModifyDelegate val26 = CanModifyDurationSettings;
<>O.<3>__CanModifyDurationSettings = val26;
obj9 = (object)val26;
}
((BaseOptions)val25).CanModifyCallback = (CanModifyDelegate)obj9;
IntSliderConfigItem val27 = new IntSliderConfigItem(preDeathDurationConfigEntry, val25);
ConfigEntry<int> postDeathDurationConfigEntry = PluginConfig.PostDeathDurationConfigEntry;
IntSliderOptions val28 = new IntSliderOptions
{
Name = "Post-Death Duration",
Description = "Duration to record after death.\nMust be between 5 and 60 seconds.",
Section = "Recording"
};
((BaseRangeOptions<int>)val28).Min = 5;
((BaseRangeOptions<int>)val28).Max = 60;
((BaseOptions)val28).RequiresRestart = false;
object obj10 = <>O.<3>__CanModifyDurationSettings;
if (obj10 == null)
{
CanModifyDelegate val29 = CanModifyDurationSettings;
<>O.<3>__CanModifyDurationSettings = val29;
obj10 = (object)val29;
}
((BaseOptions)val28).CanModifyCallback = (CanModifyDelegate)obj10;
IntSliderConfigItem val30 = new IntSliderConfigItem(postDeathDurationConfigEntry, val28);
LethalConfigManager.SkipAutoGen();
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val3);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val6);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val9);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val12);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val15);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val18);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val21);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val24);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val27);
LethalConfigManager.AddConfigItem((BaseConfigItem)val30);
}
private static CanModifyResult CanModifyOverlaySettings()
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
if (SteamUtils.IsOverlayEnabled && PluginConfig.OpenOverlayConfigEntry.Value)
{
return CanModifyResult.True();
}
return CanModifyResult.False("Steam Overlay is disabled or you have not enabled the option to open the overlay on death.");
}
private static CanModifyResult CanModifyDurationSettings()
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: 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_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
return (CanModifyResult)(PluginConfig.RecordingKindConfigEntry.Value switch
{
RecordingKind.Marker => CanModifyResult.False("Duration settings are not applicable for Marker recordings."),
RecordingKind.Clip => CanModifyResult.True(),
_ => CanModifyResult.False("Unknown recording kind selected."),
});
}
private static CanModifyResult CanModifyDeathCheckSettings()
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
if (PluginConfig.OnlyClipMyDeathsConfigEntry.Value)
{
return CanModifyResult.False("You must disable 'Only Clip My Deaths' to use this feature.");
}
return CanModifyResult.True();
}
private static CanModifyResult CanModifySettings()
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
if (SteamClient.IsValid && SteamUtils.IsOverlayEnabled)
{
return CanModifyResult.True();
}
return CanModifyResult.False("Steam is not running or the Steam Overlay is disabled.");
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}