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_00d9: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Invalid comparison between Unknown and I4
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Invalid comparison between Unknown and I4
//IL_0126: Unknown result type (might be due to invalid IL or missing references)
//IL_012c: Invalid comparison between Unknown and I4
//IL_0162: Unknown result type (might be due to invalid IL or missing references)
//IL_0168: Invalid comparison between Unknown and I4
//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
//IL_020c: Unknown result type (might be due to invalid IL or missing references)
//IL_024b: Unknown result type (might be due to invalid IL or missing references)
//IL_023b: Unknown result type (might be due to invalid IL or missing references)
//IL_023d: Unknown result type (might be due to invalid IL or missing references)
//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
//IL_0306: Unknown result type (might be due to invalid IL or missing references)
//IL_030b: Unknown result type (might be due to invalid IL or missing references)
//IL_030c: Unknown result type (might be due to invalid IL or missing references)
//IL_030e: Unknown result type (might be due to invalid IL or missing references)
//IL_0313: Unknown result type (might be due to invalid IL or missing references)
//IL_0315: Unknown result type (might be due to invalid IL or missing references)
//IL_0340: Unknown result type (might be due to invalid IL or missing references)
//IL_0342: 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_038e: Unknown result type (might be due to invalid IL or missing references)
//IL_038f: Unknown result type (might be due to invalid IL or missing references)
//IL_0394: Unknown result type (might be due to invalid IL or missing references)
//IL_0397: Unknown result type (might be due to invalid IL or missing references)
//IL_0399: Unknown result type (might be due to invalid IL or missing references)
//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
//IL_0365: 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_0374: Unknown result type (might be due to invalid IL or missing references)
//IL_0379: Unknown result type (might be due to invalid IL or missing references)
//IL_037e: Unknown result type (might be due to invalid IL or missing references)
//IL_0382: Unknown result type (might be due to invalid IL or missing references)
//IL_0387: 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;
if (!((Ability)__instance).p.usingEquippedMovestyle)
{
flag = true;
((Ability)__instance).p.SwitchToEquippedMovestyle(true, false, true, true);
}
__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?");
}
}
}