using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using LLScreen;
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: AssemblyCompany("PopupsBehind")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("littleNoisesForFun")]
[assembly: AssemblyTitle("PopupsBehind")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.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 PopupsBehind
{
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "PopupsBehind";
public const string PLUGIN_NAME = "littleNoisesForFun";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace popupsBehind
{
[BepInPlugin("us.wallace.plugins.llb.popupsBehind", "popupsBehind Plug-In", "1.0.0.0")]
public class Plugin : BaseUnityPlugin
{
public static ManualLogSource BLogger;
private void Awake()
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Expected O, but got Unknown
BLogger = ((BaseUnityPlugin)this).Logger;
((BaseUnityPlugin)this).Logger.LogDebug((object)"popupsBehind");
Harmony val = new Harmony("us.wallace.plugins.llb.popupsBehind");
val.PatchAll(typeof(ScreenGameHudKShowPlayBallPatch));
val.PatchAll(typeof(ScreenGameHudKShowBurstPatch));
val.PatchAll(typeof(ScreenGameHudKShowGetReadyPatch));
}
}
internal class ScreenGameHudKShowPlayBallPatch
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyTranspiler]
private static IEnumerable<CodeInstruction> ScreenGameHudKShowPlayBallMethod(IEnumerable<CodeInstruction> instructions)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Expected O, but got Unknown
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Expected O, but got Unknown
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Expected O, but got Unknown
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Expected O, but got Unknown
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Expected O, but got Unknown
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Expected O, but got Unknown
CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
val.Start();
val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[6]
{
new CodeMatch((OpCode?)OpCodes.Ldsfld, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Ldstr, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Ldc_R4, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Ldc_R4, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Call, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Stfld, (object)null, (string)null)
});
val.RemoveInstruction();
val.Insert((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<Transform>>((Func<Transform>)(() => UIScreen.GetUIBack())) });
return val.InstructionEnumeration();
}
}
internal class ScreenGameHudKShowBurstPatch
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyTranspiler]
private static IEnumerable<CodeInstruction> ScreenGameHudKShowBurstMethod(IEnumerable<CodeInstruction> instructions)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Expected O, but got Unknown
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Expected O, but got Unknown
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Expected O, but got Unknown
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Expected O, but got Unknown
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Expected O, but got Unknown
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Expected O, but got Unknown
CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
val.Start();
val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[6]
{
new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Ldarg_0, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Call, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Callvirt, (object)null, (string)null)
});
val.Advance(5);
val.RemoveInstructions(1);
val.Insert((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Action<RectTransform, Transform>>((Action<RectTransform, Transform>)delegate(RectTransform tfBurst, Transform basedTransform)
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
((Transform)tfBurst).SetParent(basedTransform);
((Transform)tfBurst).SetParent(UIScreen.GetUIBack(), true);
((Transform)tfBurst).localScale = Vector3.one;
}) });
return val.InstructionEnumeration();
}
}
internal class ScreenGameHudKShowGetReadyPatch
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyTranspiler]
private static IEnumerable<CodeInstruction> ScreenGameHudKShowGetReadyMethod(IEnumerable<CodeInstruction> instructions)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Expected O, but got Unknown
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Expected O, but got Unknown
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Expected O, but got Unknown
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Expected O, but got Unknown
//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Expected O, but got Unknown
//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Expected O, but got Unknown
//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Expected O, but got Unknown
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_010a: Expected O, but got Unknown
CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
val.Start();
val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[4]
{
new CodeMatch((OpCode?)OpCodes.Ldarg_0, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Call, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Ldstr, (object)null, (string)null)
});
val.Advance(0);
val.RemoveInstructions(3);
val.Insert((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<Transform>>((Func<Transform>)(() => UIScreen.GetUIBack())) });
val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[4]
{
new CodeMatch((OpCode?)OpCodes.Ldarg_0, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Call, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Ldstr, (object)null, (string)null)
});
val.Advance(0);
val.RemoveInstructions(3);
val.Insert((CodeInstruction[])(object)new CodeInstruction[1] { Transpilers.EmitDelegate<Func<Transform>>((Func<Transform>)(() => UIScreen.GetUIBack())) });
return val.InstructionEnumeration();
}
}
}