using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using Agents;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using ChainedPuzzles;
using Il2CppInterop.Runtime.Injection;
using Il2CppInterop.Runtime.InteropTypes;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using LevelGeneration;
using Microsoft.CodeAnalysis;
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("PointBlank")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("PointBlank")]
[assembly: AssemblyTitle("PointBlank")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace PointBlank
{
[BepInPlugin("PointBlank", "PointBlank", "0.0.3")]
public class Plugin : BasePlugin
{
public class PointBlank : MonoBehaviour
{
public static void Deleg()
{
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Invalid comparison between Unknown and I4
//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
Enumerator<LG_Zone> enumerator = Builder.CurrentFloor.allZones.GetEnumerator();
while (enumerator.MoveNext())
{
LG_Zone current = enumerator.Current;
if ((Object)(object)current.m_sourceGate == (Object)null || !current.m_sourceGate.IsCheckpointDoor)
{
continue;
}
foreach (LG_SecurityDoor componentsInChild in ((Component)current.m_sourceGate).GetComponentsInChildren<LG_SecurityDoor>())
{
if ((int)componentsInChild.LastStatus != 10 && !(((Component)((Il2CppObjectBase)((Il2CppArrayBase<iChainedPuzzleCore>)(object)componentsInChild.m_checkpointPuzzle.m_chainedPuzzleCores)[0]).TryCast<CP_Bioscan_Core>()).GetComponent<CP_PlayerScanner>().m_scanProgression < 0.9f))
{
L.LogInfo((object)"checkpoint door opens without actually saving checkpoint, enjoy");
pDoorState currentSyncState = componentsInChild.m_sync.GetCurrentSyncState();
currentSyncState.status = (eDoorStatus)16;
currentSyncState.hasBeenOpenedDuringGame = true;
componentsInChild.Gate.HasBeenOpenedDuringPlay = true;
componentsInChild.m_sync.SetStateUnsynced(currentSyncState);
componentsInChild.m_sync.AttemptDoorInteraction((eDoorInteractionType)0, 0f, 0f, default(Vector3), (Agent)null);
}
}
}
}
public static void Initialize()
{
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Expected O, but got Unknown
bool flag = default(bool);
foreach (LG_SecurityDoor item in Object.FindObjectsOfType<LG_SecurityDoor>())
{
try
{
if (!((Object)(object)item.m_checkpointPuzzle == (Object)null) && !((Delegate)(object)item.m_checkpointPuzzle.OnPuzzleSolved == (Delegate)null))
{
item.m_checkpointPuzzle.OnPuzzleSolved = null;
item.m_checkpointPuzzle.OnPuzzleSolved += Action.op_Implicit((Action)Deleg);
ManualLogSource l = L;
BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(29, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("door ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(((Object)item).name);
((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" checkpoint KIA, kapowww");
}
l.LogInfo(val);
}
}
catch
{
}
}
}
}
internal static ManualLogSource L;
public override void Load()
{
ClassInjector.RegisterTypeInIl2Cpp<PointBlank>();
LG_Factory.OnFactoryBuildDone += Action.op_Implicit((Action)PointBlank.Initialize);
L = ((BasePlugin)this).Log;
}
}
[GeneratedCode("VersionInfoGenerator", "2.0.0+git50a4b1a-master")]
[CompilerGenerated]
internal static class VersionInfo
{
public const string RootNamespace = "PointBlank";
public const string Version = "1.0.0";
public const string VersionPrerelease = null;
public const string VersionMetadata = null;
public const string SemVer = "1.0.0";
public const string GitRevShort = null;
public const string GitRevLong = null;
public const string GitBranch = null;
public const string GitTag = null;
public const bool GitIsDirty = false;
}
}