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 Microsoft.CodeAnalysis;
using Reptile;
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(".NETFramework,Version=v4.6", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("TriGrindr")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Triangle Grind")]
[assembly: AssemblyFileVersion("0.0.1.0")]
[assembly: AssemblyInformationalVersion("0.0.1")]
[assembly: AssemblyProduct("TriGrindr")]
[assembly: AssemblyTitle("TriGrindr")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.1.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 trigrindr
{
[BepInPlugin("info.mariobluegloves.trigrindr", "Triangle Grind", "0.0.1")]
[BepInProcess("Bomb Rush Cyberfunk.exe")]
public class GriTAPatchTG
{
[HarmonyPatch(typeof(GrindAbility), "SetToLine")]
[HarmonyPrefix]
private static bool GriTAPatchPreFix(GrindAbility __instance, GrindLine setGrindLine)
{
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Invalid comparison between Unknown and I4
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Invalid comparison between Unknown and I4
//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Invalid comparison between Unknown and I4
//IL_013a: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Invalid comparison between Unknown and I4
//IL_0179: Unknown result type (might be due to invalid IL or missing references)
//IL_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_01a0: 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_01a8: Unknown result type (might be due to invalid IL or missing references)
//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
//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_01e4: Unknown result type (might be due to invalid IL or missing references)
//IL_0223: Unknown result type (might be due to invalid IL or missing references)
//IL_0213: 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_027b: Unknown result type (might be due to invalid IL or missing references)
//IL_029e: 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_02e3: Unknown result type (might be due to invalid IL or missing references)
//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
//IL_0318: Unknown result type (might be due to invalid IL or missing references)
//IL_031a: Unknown result type (might be due to invalid IL or missing references)
//IL_031f: Unknown result type (might be due to invalid IL or missing references)
//IL_0366: Unknown result type (might be due to invalid IL or missing references)
//IL_0367: Unknown result type (might be due to invalid IL or missing references)
//IL_036c: Unknown result type (might be due to invalid IL or missing references)
//IL_036f: Unknown result type (might be due to invalid IL or missing references)
//IL_0371: Unknown result type (might be due to invalid IL or missing references)
//IL_037c: Unknown result type (might be due to invalid IL or missing references)
//IL_037f: Unknown result type (might be due to invalid IL or missing references)
//IL_0384: Unknown result type (might be due to invalid IL or missing references)
//IL_033d: Unknown result type (might be due to invalid IL or missing references)
//IL_0347: Unknown result type (might be due to invalid IL or missing references)
//IL_034c: Unknown result type (might be due to invalid IL or missing references)
//IL_0351: Unknown result type (might be due to invalid IL or missing references)
//IL_0356: Unknown result type (might be due to invalid IL or missing references)
//IL_035a: Unknown result type (might be due to invalid IL or missing references)
//IL_035f: Unknown result type (might be due to invalid IL or missing references)
if (((Ability)__instance).p.trick2ButtonNew || ((Ability)__instance).p.trick2ButtonHeld)
{
__instance.timeSinceLastNode = 0f;
__instance.speedTarget = ((Ability)__instance).p.stats.grindSpeed;
bool flag = false;
__instance.speed = Mathf.Max(((Ability)__instance).p.boosting ? ((Ability)__instance).p.boostSpeed : ((Ability)__instance).p.stats.grindSpeed, ((Ability)__instance).p.GetForwardSpeed());
__instance.startTrickNames = __instance.trickingStartTrickNames;
__instance.trickNames = __instance.trickingTrickNames;
__instance.trickStandardDuration = __instance.trickingTrickDuration;
if ((int)((Ability)__instance).p.moveStyle == 2 || (int)((Ability)__instance).p.moveStyle == 4)
{
__instance.startTrickNames = __instance.skateboardStartTrickNames;
__instance.trickNames = __instance.skateboardTrickNames;
__instance.trickStandardDuration = __instance.skateboardTrickDuration;
}
else if ((int)((Ability)__instance).p.moveStyle == 3)
{
__instance.startTrickNames = __instance.inlineStartTrickNames;
__instance.trickNames = __instance.inlineTrickNames;
__instance.trickStandardDuration = __instance.trickingTrickDuration;
}
else if ((int)((Ability)__instance).p.moveStyle == 1)
{
__instance.startTrickNames = __instance.bmxStartTrickNames;
__instance.trickNames = __instance.bmxTrickNames;
__instance.trickStandardDuration = __instance.bmxTrickDuration;
}
Vector3 position = ((Ability)__instance).p.tf.position;
((Ability)__instance).p.motor.HaveCollision(false);
((Ability)__instance).p.ForceUnground(true);
Vector3 playerDirForLine = __instance.GetPlayerDirForLine(setGrindLine);
__instance.nextNode = setGrindLine.GetNextNode(playerDirForLine);
((Ability)__instance).p.SetVelocity(Vector3.zero);
((Ability)__instance).p.ResetVisualRot();
Vector3 val = setGrindLine.SnapPosToLine(position);
((Ability)__instance).p.motor.SetPositionTeleport(val);
__instance.grindLine = setGrindLine;
__instance.lastPath = __instance.grindLine.Path;
__instance.posOnLine = (__instance.justFollowNodes ? __instance.grindLine.GetRelativePosOnLine(val, __instance.nextNode) : __instance.grindLine.GetRelativePosOnLine(val, playerDirForLine));
if (Object.op_Implicit((Object)(object)__instance.grindLine.attachedToEnemyGrindLine))
{
__instance.grindingOnEnemy = __instance.grindLine.attachedToEnemyGrindLine;
__instance.grindingOnEnemy.BeingGrindedByPlayer = true;
}
AudioManager audioManager = ((Ability)__instance).p.AudioManager;
audioManager.PlaySfxGameplay(setGrindLine.sfxCollection, (AudioClipID)327, ((Ability)__instance).p.playerOneShotAudioSource, 0f);
audioManager.PlaySfxGameplayLooping(setGrindLine.sfxCollection, (AudioClipID)11, ((Ability)__instance).p.playerGrindLoopAudioSource, 0f, 0f);
((Ability)__instance).p.anim.SetFloat(__instance.grindBoostHash, 0f);
__instance.grindTilt = (__instance.grindTiltBuffer = Vector2.zero);
__instance.grindTiltBufferTimer = 0f;
__instance.softCornerBoost = false;
((Ability)__instance).p.ActivateAbility((Ability)(object)__instance);
__instance.normal = __instance.grindLine.GetNormalAtPos(val);
if (__instance.grindLine.isPole)
{
Vector3 val2 = Vector3.ProjectOnPlane(((Ability)__instance).p.dir * -1f, Vector3.up);
__instance.normal = ((Vector3)(ref val2)).normalized;
}
Vector3 val3 = (__instance.preGrindDir = setGrindLine.GetLineDir(playerDirForLine));
((Ability)__instance).p.SetRotHard(Quaternion.LookRotation(val3, __instance.normal));
__instance.StartGrindTrick(true, flag);
}
return false;
}
}
[BepInPlugin("info.mariobluegloves.trigrindr", "Triangle Grind", "0.0.1")]
[BepInProcess("Bomb Rush Cyberfunk.exe")]
public class SquirtAbilityPatches : BaseUnityPlugin
{
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
Harmony val = new Harmony("info.mariobluegloves.trigrindrp");
val.PatchAll(typeof(GriTAPatchTG));
val.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"why im sufing rail?");
}
}
}