Decompiled source of SojournStopGo v1.0.0

SojournStopGo.dll

Decompiled 13 hours ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using RoR2;
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(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("SojournStopGo")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SojournStopGo")]
[assembly: AssemblyTitle("SojournStopGo")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SojournStopGo;

[BepInPlugin("JohnRose.SojournStopGo", "Sojourn Stop Go", "1.0.0")]
public class Plugin : 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("JohnRose.SojournStopGo");
		val.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Sojourn Stop Go loaded!");
	}
}
[HarmonyPatch(typeof(SojournVehicleBase))]
public static class SojournVehiclePatch
{
	[HarmonyPostfix]
	[HarmonyPatch("FixedUpdateMovement")]
	private static void FixedUpdateMovement_Postfix(VehicleSeat ___vehicleSeat, Rigidbody ___vehicleRigidbody)
	{
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)___vehicleSeat == (Object)null) && !((Object)(object)___vehicleRigidbody == (Object)null))
		{
			InputBankTest currentPassengerInputBank = ___vehicleSeat.currentPassengerInputBank;
			if (!((Object)(object)currentPassengerInputBank == (Object)null) && currentPassengerInputBank.moveVector.z <= 0f)
			{
				___vehicleRigidbody.velocity = Vector3.zero;
			}
		}
	}
}