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.Unity.IL2CPP;
using Decals;
using GTFO.API;
using HarmonyLib;
using LevelGeneration;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("RespawnSackBarcodeFix")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+fa0ecc280758fb9547bca8621429e02918217598")]
[assembly: AssemblyProduct("RespawnSackBarcodeFix")]
[assembly: AssemblyTitle("RespawnSackBarcodeFix")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[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]
[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 RespawnSackBarcodeFix
{
[BepInPlugin("Amor.RespawnSackBarcodeFix", "RespawnSackBarcodeFix", "1.1.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
internal class EntryPoint : BasePlugin
{
public override void Load()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
new Harmony("Amor.RespawnSackBarcodeFix").PatchAll();
((BasePlugin)this).Log.LogMessage((object)"RespawnSackBarcodeFix is done loading!");
}
}
[HarmonyPatch]
internal static class BarcodeFix
{
private static readonly string[] _assets = new string[4] { "Assets/AssetPrefabs/Characters/Enemies/Respawner/respawner_small_01.prefab", "Assets/AssetPrefabs/Characters/Enemies/Respawner/respawner_womb_litter_01.prefab", "Assets/AssetPrefabs/Characters/Enemies/Respawner/respawner_01.prefab", "Assets/AssetPrefabs/Characters/Enemies/Respawner/respawner_womb_litter_01.prefab" };
[HarmonyPatch(typeof(LG_LoadComplexDataSetResourcesJob), "Build")]
[HarmonyPrefix]
[HarmonyPriority(300)]
[HarmonyWrapSafe]
private static void RotateBloodsplatterDecals(LG_LoadComplexDataSetResourcesJob __instance)
{
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
if (__instance.m_loadingStarted)
{
return;
}
HashSet<Decal> hashSet = new HashSet<Decal>();
string[] assets = _assets;
GameObject val = default(GameObject);
foreach (string text in assets)
{
if (AssetAPI.TryGetLoadedAsset<GameObject>(text, ref val))
{
hashSet.UnionWith((IEnumerable<Decal>)val.GetComponentsInChildren<Decal>());
}
}
foreach (Decal item in hashSet)
{
((Component)item).transform.rotation = default(Quaternion);
}
}
}
}