using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using InControl;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: SecurityPermission(8, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(/*Could not decode attribute arguments.*/)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
[BepInPlugin("Systems.R00t.MorePicksPatch", "More Picks Patch", "1.0.0")]
[BepInProcess("Rounds.exe")]
[HarmonyPatch]
public class Patch : BaseUnityPlugin
{
private const string ModId = "Systems.R00t.MorePicksPatch";
private const string ModName = "More Picks Patch";
public const string Version = "1.0.0";
private void Start()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("Systems.R00t.MorePicksPatch").PatchAll();
}
}
[Serializable]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
public class FixLandfallsShitAgain : Object
{
public static void Prefix(CardChoice __instance, out int __state)
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
__state = -1;
if (__instance.spawnedCards.Count == 0 || __instance.pickrID == -1)
{
return;
}
PlayerActions[] array = (((int)__instance.pickerType != 0) ? PlayerManager.instance.GetActionsFromPlayer(__instance.pickrID) : PlayerManager.instance.GetActionsFromTeam(__instance.pickrID));
if (array == null)
{
return;
}
for (int i = 0; i < array.Length; i++)
{
if (array[i] != null && ((OneAxisInputControl)array[i].Jump).WasPressed && !__instance.isPlaying && (Object)(object)__instance.spawnedCards[__instance.currentlySelectedCard] != (Object)null)
{
__state = __instance.pickrID;
}
}
}
public static void Postfix(CardChoice __instance, ref int __state)
{
if (__state != -1)
{
__instance.pickrID = __state;
}
}
[HarmonyPrefix]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
public static void FixID(CardChoice __instance)
{
__instance.pickrID = -1;
}
}